(BiNode root, String spaces)
| 62 | } |
| 63 | |
| 64 | public static void printAsTree(BiNode root, String spaces) { |
| 65 | if (root == null) { |
| 66 | System.out.println(spaces + "- null"); |
| 67 | return; |
| 68 | } |
| 69 | System.out.println(spaces + "- " + root.data); |
| 70 | printAsTree(root.node1, spaces + " "); |
| 71 | printAsTree(root.node2, spaces + " "); |
| 72 | } |
| 73 | |
| 74 | public static void main(String[] args) { |
| 75 | BiNode root = createTree(); |