(String[] args)
| 31 | } |
| 32 | |
| 33 | public static void main(String[] args) { |
| 34 | int[] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; |
| 35 | TreeNode root = TreeNode.createMinimalBST(array); |
| 36 | TreeNode n3 = root.find(9); |
| 37 | TreeNode n7 = new TreeNode(6);//root.find(10); |
| 38 | TreeNode ancestor = commonAncestorBad(root, n3, n7); |
| 39 | if (ancestor != null) { |
| 40 | System.out.println(ancestor.data); |
| 41 | } else { |
| 42 | System.out.println("null"); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | } |
nothing calls this directly
no test coverage detected