File tree Expand file tree Collapse file tree
main/java/com/dataStructures
test/java/com/dataStructures Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- package dataStructures ;
1+ package src . main . java . com . dataStructures ;
22
33/**
44 * Binary tree for general value type, without redundancy
@@ -76,7 +76,7 @@ public BinaryTree search(T data){
7676 * @return true if this tree contains the data value, false if not.
7777 */
7878 public boolean contains (T data ){
79- return !( this .search (data ) == null ) ;
79+ return this .search (data ) != null ;
8080 }
8181
8282 /**
@@ -89,10 +89,10 @@ private void print(int tabCounter){
8989
9090 System .out .println (this );
9191
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
9696 }
9797
9898 /**
Original file line number Diff line number Diff line change 1- package dataStructures ;
1+ package src . main . java . com . dataStructures ;
22
33import org .junit .Test ;
44import static org .junit .Assert .*;
You can’t perform that action at this time.
0 commit comments