unique position in sorted binary tree

I saw the hint: There is only one unique position for any element to be inserted.
while for sorted binary tree:
--------4
------/---\
-----2
---/---\
--1-----B
/---\
-----A
where should I insert 2 ? At A or B?

1 comments

  • @ 2018-06-06 23:24:54

    Please review your project specifications carefully. Pay attention to the definition of binary search trees (sorted binary tree) in the specs. Pay extra attention to 'which side covers "equal" case?".

  • 1