()
| 67 | } |
| 68 | |
| 69 | public int height() { |
| 70 | int leftHeight = left != null ? left.height() : 0; |
| 71 | int rightHeight = right != null ? right.height() : 0; |
| 72 | return 1 + Math.max(leftHeight, rightHeight); |
| 73 | } |
| 74 | |
| 75 | public TreeNode find(int d) { |
| 76 | if (d == data) { |