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

Method printLinkedListTree

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

Source from the content-addressed store, hash-verified

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

Callers 1

mainMethod · 0.95

Calls 1

printMethod · 0.45

Tested by

no test coverage detected