(String[] args)
| 33 | } |
| 34 | |
| 35 | public static void main(String[] args) { |
| 36 | int[] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; |
| 37 | TreeNode root = TreeNode.createMinimalBST(array); |
| 38 | for (int i = 0; i < array.length; i++) { |
| 39 | TreeNode node = root.find(array[i]); |
| 40 | TreeNode next = inorderSucc(node); |
| 41 | if (next != null) { |
| 42 | System.out.println(node.data + "->" + next.data); |
| 43 | } else { |
| 44 | System.out.println(node.data + "->" + null); |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | } |
nothing calls this directly
no test coverage detected