Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit954f068

Browse files
committed
Update TreeNode.java
1 parent2884ce3 commit954f068

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎__Supports/TreeNode.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
//package supports;
1+
//package supports;
22

33
importjava.util.LinkedList;
44
importjava.util.Queue;
55

66
publicclassTreeNode {
7-
publicintval;
7+
publicintkey,val;
88
publicTreeNodeleft;
99
publicTreeNoderight;
10-
publicTreeNode(intx) {val =x; }
10+
publicTreeNode(intkey,intval) {
11+
this.key =key;
12+
this.val =val;
13+
}
14+
publicTreeNode(intval) {
15+
this.val =val;
16+
}
1117

1218
publicstaticTreeNodeconstructTreeFromString(Stringstr) {
1319
String[]strs =str.split(",");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp