We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43e07b9 commit cf658c2Copy full SHA for cf658c2
1 file changed
PuzzleCoding/src/TreeLeafPath.java
@@ -5,15 +5,14 @@
5
/**
6
* print out all leaf node path with non recursive method
7
* The structure of node is *NOT* binary tree, is just a normal tree.
8
- * <p/>
9
10
- * // print out all leaf node path
+ *
+ * print out all leaf node path
11
* // 12
12
* // 4 8 22
13
* //1 2 3 9 18 24
14
15
* the output is like:
16
17
* 12, 4, 1,
18
* 12, 4, 2,
19
* 12, 4, 3,
@@ -78,6 +77,9 @@ public static void main(String[] args) {
78
77
TreeLeafPath node9 = new TreeLeafPath(9);
79
TreeLeafPath node18 = new TreeLeafPath(18);
80
TreeLeafPath node22 = new TreeLeafPath(22);
+ TreeLeafPath node16 = new TreeLeafPath(16);
81
+
82
+ node18.addTree(node16);
83
node18.addTree(node22);
84
node8.addTree(node9);
85
node8.addTree(node18);
0 commit comments