You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BinaryTree method find() confusing return value #104
The find(int key) method in the BinaryTree class returns the node with the value int, if it's found, and root if there is no such node. This is confusing behavior, first of all, as one would expect it to return null, and is also problematic, since the root itself can match the query.
I suggest simply changing this function to return null on an unsuccessful query.
Activity
Changed find(int key) method to return null when node is not found, and
Changed find(int key) method to return null when node is not found, a…