Question d’entretien chez 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

Réponse à la question d'entretien

Utilisateur anonyme

18 août 2015

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