(TreeNode n)
| 23 | } |
| 24 | |
| 25 | public static TreeNode leftMostChild(TreeNode n) { |
| 26 | if (n == null) { |
| 27 | return null; |
| 28 | } |
| 29 | while (n.left != null) { |
| 30 | n = n.left; |
| 31 | } |
| 32 | return n; |
| 33 | } |
| 34 | |
| 35 | public static void main(String[] args) { |
| 36 | int[] array = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; |