aboutsummaryrefslogtreecommitdiff
path: root/node
diff options
context:
space:
mode:
Diffstat (limited to 'node')
-rw-r--r--node/ListNode.java8
-rw-r--r--node/TreeNode.classbin0 -> 466 bytes
-rw-r--r--node/TreeNode.java19
3 files changed, 25 insertions, 2 deletions
diff --git a/node/ListNode.java b/node/ListNode.java
index 6b345ec..33e1803 100644
--- a/node/ListNode.java
+++ b/node/ListNode.java
@@ -4,6 +4,10 @@ public class ListNode {
public int val;
public ListNode next;
public ListNode() {}
- public ListNode(int val) { this.val = val;}
- public ListNode(int val, ListNode next) { this.val = val; this.next = next; }
+ public ListNode(int val) {
+ this.val = val;
+ }
+ public ListNode(int val, ListNode next) {
+ this.val = val; this.next = next;
+ }
}
diff --git a/node/TreeNode.class b/node/TreeNode.class
new file mode 100644
index 0000000..634ad75
--- /dev/null
+++ b/node/TreeNode.class
Binary files differ
diff --git a/node/TreeNode.java b/node/TreeNode.java
new file mode 100644
index 0000000..b820151
--- /dev/null
+++ b/node/TreeNode.java
@@ -0,0 +1,19 @@
+package node;
+
+import java.lang.*;
+import java.util.*;
+
+public class TreeNode {
+ public int val;
+ public TreeNode left;
+ public TreeNode right;
+ public TreeNode() {}
+ public TreeNode(int val) {
+ this.val = val;
+ }
+ public TreeNode(int val, TreeNode left, TreeNode right) {
+ this.val = val;
+ this.left = left;
+ this.right = right;
+ }
+}