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

Method main

java/Chapter 4/Question4_7/QuestionB.java:32–39  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

30 }
31
32 public static void main(String[] args) {
33 int[] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
34 TreeNode root = TreeNode.createMinimalBST(array);
35 TreeNode n3 = root.find(1);
36 TreeNode n7 = root.find(7);
37 TreeNode ancestor = commonAncestor(root, n3, n7);
38 System.out.println(ancestor.data);
39 }
40
41}

Callers

nothing calls this directly

Calls 3

createMinimalBSTMethod · 0.95
findMethod · 0.95
commonAncestorMethod · 0.95

Tested by

no test coverage detected