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 9ad7f68 commit bcce0ddCopy full SHA for bcce0dd
group18/1049843090/src/com/coding/basic/BinaryTreeNode.java
@@ -43,25 +43,11 @@ public void setRight(BinaryTreeNode right) {
43
}
44
45
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;
+ return null;
53
54
55
public BinaryTreeNode(Object o){
56
this.setData(o);
57
58
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
67
0 commit comments