You are viewing a single comment's thread. Return to all comments →
Guys will this work for if the BinaryTree has Duplicate Values as said in the question, duplicate values are not allowed in BST?
It's a Binary Search Tree which doesn't allow repeated values, because every value in the left must be lower than the current root and every value in the right must be higher.
So it will return False.