Skip to content

Commit bcce0dd

Browse files
committed
modify
1 parent 9ad7f68 commit bcce0dd

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

group18/1049843090/src/com/coding/basic/BinaryTreeNode.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,11 @@ public void setRight(BinaryTreeNode right) {
4343
}
4444

4545
public BinaryTreeNode insert(Object o) {
46-
BinaryTreeNode newNode = new BinaryTreeNode(o);
47-
if ((int)data<(int)o) {
48-
this.right = newNode;
49-
} else {
50-
this.left = newNode;
51-
}
52-
return newNode;
46+
return null;
5347
}
5448

5549
public BinaryTreeNode(Object o){
5650
this.setData(o);
5751
}
5852

59-
60-
61-
public static void main(String[] args) {
62-
BinaryTreeNode binaryTreeNode = new BinaryTreeNode(1);
63-
binaryTreeNode.insert(2);
64-
System.out.println(binaryTreeNode.getRight().getData());
65-
}
66-
6753
}

0 commit comments

Comments
 (0)