Frage im Vorstellungsgespräch bei Amazon

How do you insert into a binary tree?

Antworten zu Vorstellungsgespräch

Anonym

24. März 2010

You find the spot to insert by traversing to where you think it is located. Then, you add it there if you don't find it. The complexity is O(log n)

Anonym

22. Juni 2010

was it a general binary tree or bst?