I know that, BST
does not allow duplicates. For example, if I have a word "RABSAB".
The Binary search tree for the above string is:
R
/\
A S
\
B
What if we wanted to include the duplicates in the tree. How the tree gonna change? I was asked this question in an interview.
They asked me to draw:
- a binary tree
- an unbalanced Binary Search Tree
- a binary search tree without duplicates
- a binary search tree with duplicates
Any Help is appreciated!
PS: Help me by drawing the related trees