I have a BinaryTree class which contains Root node of custom type TreeNode.
TreeNode class has,
T value;
BTree<T> left, right;
BTree is an interface which is implemented in BinaryTree. in that binary tree class there is a method to check whether the tree contains specific value in a node.
@Override
public boolean contains(T value) {
return false;
}
I need to implement this method, maybe i have to use a recursive way.