(String[] args)
| 52 | } |
| 53 | |
| 54 | public static void main(String[] args) { |
| 55 | int[] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; |
| 56 | TreeNode root = TreeNode.createMinimalBST(array); |
| 57 | TreeNode n3 = root.find(10); |
| 58 | TreeNode n7 = root.find(6); |
| 59 | TreeNode ancestor = commonAncestor(root, n3, n7); |
| 60 | if (ancestor != null) { |
| 61 | System.out.println(ancestor.data); |
| 62 | } else { |
| 63 | System.out.println("null"); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | } |
nothing calls this directly
no test coverage detected