Skip to content

Commit 14c60ed

Browse files
author
exuuguu
committed
add example code
0 parents  commit 14c60ed

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

ListNode.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
public class ListNode{
2+
private int val;
3+
public ListNode next;
4+
5+
public ListNode(final int val){
6+
this.val = val;
7+
this.next = null;
8+
}
9+
10+
public int value(){
11+
return this.val;
12+
}
13+
}

TreeNode.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
public class TreeNode{
2+
private int val;
3+
public TreeNode left, right;
4+
5+
public TreeNode(final int val){
6+
this.val = val;
7+
this.left = this.right = null;
8+
}
9+
10+
public int value(){
11+
return this.val;
12+
}
13+
}

0 commit comments

Comments
 (0)