Frage im Vorstellungsgespräch bei Amazon

Question from one developer: Write code to traverse the binary in "level order" in any languages - C, C++ or Java. Describe Time and Space complexities

Antwort im Vorstellungsgespräch

Anonym

18. Aug. 2015

As you visit each node, you keep both next and right pointers in a queue (FIFO). Time Complexity O(n)