In standard binary tree can parent node and child node have same data

in standard binary tree do child and parent node can have same data if yes do we have to put it in left or right and how can we find in search that its position of same numbers in tree

because there are some sites suggesting we can have same values

Yes it can. You just need to make sure that for all vertices c in the left subtree of p it must hold that val(c)\leq val(p), and similarily for the right subtree val(c)\geq val(p). As you can see it does not matter whether the same values go to the left or right subtree. This is important if you want a balanced binary search tree. When searching for a value however you will find the top-most vertex with that value.


Got it
Thank you :slight_smile: