Estoy teniendo un problema encontrar la manera de conseguir mi función de búsqueda para trabajar por mi árbol binario que devuelve verdadero para la raíz, pero no sé cómo hacer para recorrer el resto del árbol.
public boolean contains(Object e)
{
return search(root, e);
}
private boolean search(BinaryNode n, Object e)
{
//If the current node is null,
//then the value clearly isn't found and return false.
if (n == null)
{
return false;
}
//If the node contains the search value,
//then the value is found and return true.
if(n.getValue() == e)
{
return true;
}
//If the node isn't null but also doesn't contain the search value,
//then search both the left and right subtrees
return false;
}













