Pergunta de entrevista da empresa X

Perform level-order traversal of an incomplete binary tree, i.e. certain nodes at a level could be empty.

Respostas da entrevista

Sigiloso

15 de fev. de 2013

BFS

1

Sigiloso

27 de mar. de 2013

I am thinking DFS is better, because you know the level otherwise for BFS how do you find if the NULL is the end of your level or just a NULL node?