File tree 2 files changed +7
-7
lines changed
main/java/com/dataStructures
test/java/com/dataStructures 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
- package dataStructures ;
1
+ package src . main . java . com . dataStructures ;
2
2
3
3
/**
4
4
* Binary tree for general value type, without redundancy
@@ -76,7 +76,7 @@ public BinaryTree search(T data){
76
76
* @return true if this tree contains the data value, false if not.
77
77
*/
78
78
public boolean contains (T data ){
79
- return !( this .search (data ) == null ) ;
79
+ return this .search (data ) != null ;
80
80
}
81
81
82
82
/**
@@ -89,10 +89,10 @@ private void print(int tabCounter){
89
89
90
90
System .out .println (this );
91
91
92
- if (this .left != null )
93
- this .left .print (tabCounter + 1 ); //it can't be ++ , pls don't change it
94
- if (this .right != null )
95
- this .right .print (tabCounter + 1 ); //it can't be ++ , pls don't change it
92
+ if (this .left != null )
93
+ this .left .print (tabCounter + 1 ); //it can't be ++ , pls don't change it
94
+ if (this .right != null )
95
+ this .right .print (tabCounter + 1 ); //it can't be ++ , pls don't change it
96
96
}
97
97
98
98
/**
Original file line number Diff line number Diff line change 1
- package dataStructures ;
1
+ package src . main . java . com . dataStructures ;
2
2
3
3
import org .junit .Test ;
4
4
import static org .junit .Assert .*;
You can’t perform that action at this time.
0 commit comments