Blog
How do you find duplicates in a binary search tree?
How do you find duplicates in a binary search tree? A simple solution is to store inorder traversal of given binary tree in an array. Then check if array has duplicates or not. We can avoid the use of array and solve the problem in O(n) time. The idea is Read more…