You are viewing a single comment's thread. Return to all comments →
if (root.data >= max || root.data <= min) { return false;
here it will fail. if there is single node root and root has data 0
Seems like cookies are disabled on this browser, please enable them to open this website
Is This a Binary Search Tree?
You are viewing a single comment's thread. Return to all comments →
if (root.data >= max || root.data <= min) { return false;
here it will fail. if there is single node root and root has data 0