Frage im Vorstellungsgespräch bei Amazon

How do you check if the given binary tree is binary search tree?

Antwort im Vorstellungsgespräch

Anonym

5. Jan. 2010

Do in order traversal and see if the result is a sorted array. O(n) time and space.