c# - Inserting Duplicate Values in Binary Search Tree -
First of all I know that this question has been asked many times then my apologies but I lost When I had thought of creating a BST for the word Duplicate with 'BERNER' .
So I know that it can look like this, I'm done halfway with it but when I N and R
B / ER / E , then I got confused> In addition to this I have some other questions < Ol>
The first 'E' in the BST is initially placed on the right E & gt; B due to Root node (B) , but when we go to 'R' it gets the right node and ' E ' gets the left node so I was thinking that E & gt; Since the BST rule is not a violation. B , and this should be the correct node of 'B' ? Is this a rule that I am missing?
Creating 'Barrier' Without Duplicate
Any help / suggestions will be appreciated. Please do not be hard on me. I am a newbie for BST concepts
Binary Tree for BERNER (Please note that there should be no duplicate nodes in BST), with the idea that not to separate the left or right nodes When its value is equal to its parent.
Comments
Post a Comment