The Beastie Forums
Inserted A Repeat Value - BST - Printable Version

+- The Beastie Forums (http://beastie.cs.ua.edu/mybb)
+-- Forum: Analysis of Algorithms (http://beastie.cs.ua.edu/mybb/forumdisplay.php?fid=3)
+--- Forum: Project 1 (http://beastie.cs.ua.edu/mybb/forumdisplay.php?fid=5)
+--- Thread: Inserted A Repeat Value - BST (/showthread.php?tid=182)



Inserted A Repeat Value - BST - Arife1 - 09-14-2017

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?


RE: Inserted A Repeat Value - BST - smmitchell2 - 09-14-2017

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.