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