I have this method that returns true if attribute is already used and false otherwise:
public boolean alreadNodealreadyUsed(Node node, int attribute)
{
if (node.parent == null)
{
return false;
}
if (node.children != null)
{
if (node.splitAttribute == attribute )
{
return true;
}
e}
return alreadyUsed(node.parent, attribute);
}
Can this be written in a more understandable way?