Domanda di colloquio di Palantir Technologies

Print a binary tree using breadth first search, i.e. print all numbers level by level on a tree. Add a line break between each level.

Risposta di colloquio

Anonimo

4 apr 2014

You need two counters to keep track of where you are and you need to use a queue to perform BFS

1