The Beastie Forums

Full Version: Inserted A Repeat Value - BST
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If we insert a value that is the same as a previous one, our comparator function would return 0 when they are compared. Do we continue to insert it again somewhere else? Would it go to the left or the right of that node?
It says in the description variables will be declared once so the tree will contain unique values. So I assume he won't use values that are the same.