File tree 1 file changed +20
-17
lines changed
src/main/java/com/fishercoder/common/classes
1 file changed +20
-17
lines changed Original file line number Diff line number Diff line change 4
4
import java .util .List ;
5
5
6
6
public class Node {
7
- public int val ;
8
- public List <Node > children ;
7
+ public int val ;
8
+ public List <Node > children ;
9
9
10
- public Node () {
11
- }
10
+ public Node () {
11
+ }
12
12
13
- public Node (int val , List <Node > children ) {
14
- this .val = val ;
15
- this .children = children ;
16
- }
13
+ public Node (int val , List <Node > children ) {
14
+ this .val = val ;
15
+ this .children = children ;
16
+ }
17
17
18
- public Node (int val ) {
19
- this .val = val ;
20
- this .children = new ArrayList <>();
21
- }
18
+ public Node (int val ) {
19
+ this .val = val ;
20
+ this .children = new ArrayList <>();
21
+ }
22
22
23
- //todo: implement this method
24
- /**return a N-ary tree based on the preorder values*/
25
- public static Node createNaryTree (List <Integer > preorderValues ) {
26
- return null ;
27
- }
23
+ //todo: implement this method
24
+
25
+ /**
26
+ * return a N-ary tree based on the preorder values
27
+ */
28
+ public static Node createNaryTree (List <Integer > preorderValues ) {
29
+ return null ;
30
+ }
28
31
}
You can’t perform that action at this time.
0 commit comments