We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2884ce3 commit 954f068Copy full SHA for 954f068
__Supports/TreeNode.java
@@ -1,13 +1,19 @@
1
-// package supports;
+//package supports;
2
3
import java.util.LinkedList;
4
import java.util.Queue;
5
6
public class TreeNode {
7
- public int val;
+ public int key, val;
8
public TreeNode left;
9
public TreeNode right;
10
- public TreeNode(int x) { val = x; }
+ public TreeNode(int key, int val) {
11
+ this.key = key;
12
+ this.val = val;
13
+ }
14
+ public TreeNode(int val) {
15
16
17
18
public static TreeNode constructTreeFromString(String str) {
19
String[] strs = str.split(",");
0 commit comments