made requested changes for binary tree implementation

This commit is contained in:
Ricaro Guevara 2019-03-24 22:54:12 -05:00
parent 2eec474f13
commit 4721cff668
2 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
package dataStructures;
package src.main.java.com.dataStructures;
/**
* Binary tree for general value type, without redundancy
@ -76,7 +76,7 @@ public class BinaryTree<T extends Comparable> {
* @return true if this tree contains the data value, false if not.
*/
public boolean contains(T data){
return !(this.search(data) == null);
return this.search(data) != null;
}
/**

View File

@ -1,4 +1,4 @@
package dataStructures;
package src.main.java.com.dataStructures;
import org.junit.Test;
import static org.junit.Assert.*;