MCPcopy Create free account
hub / github.com/careercup/ctci / printLinkedListTree

Method printLinkedListTree

java/Chapter 17/Question17_13/QuestionC.java:30–38  ·  view source on GitHub ↗
(BiNode root)

Source from the content-addressed store, hash-verified

28 }
29
30 public static void printLinkedListTree(BiNode root) {
31 for (BiNode node = root; node != null; node = node.node2) {
32 if (node.node2 != null && node.node2.node1 != node) {
33 System.out.print("inconsistent node: " + node);
34 }
35 System.out.print(node.data + "->");
36 }
37 System.out.println();
38 }
39
40 public static BiNode convertToCircular(BiNode root) {
41 if (root == null) {

Callers 1

mainMethod · 0.95

Calls 1

printMethod · 0.45

Tested by

no test coverage detected