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

Method printLinkedListTree

java/Chapter 17/Question17_13/QuestionB.java:40–48  ·  view source on GitHub ↗
(BiNode root)

Source from the content-addressed store, hash-verified

38 }
39
40 public static void printLinkedListTree(BiNode root) {
41 for (BiNode node = root; node != null; node = node.node2) {
42 if (node.node2 != null && node.node2.node1 != node) {
43 System.out.print("inconsistent node: " + node);
44 }
45 System.out.print(node.data + "->");
46 }
47 System.out.println();
48 }
49
50 public static BiNode createTree() {
51 BiNode[] nodes = new BiNode[7];

Callers 1

mainMethod · 0.95

Calls 1

printMethod · 0.45

Tested by

no test coverage detected