Pergunta de entrevista da empresa Microsoft

BFS on a binary tree

Resposta da entrevista

Sigiloso

6 de ago. de 2010

fun bfs(t,k) if (t is null) return not-found if (t.key is k) return t if (t is leaf) else r = bfs(t.left,k) if (r is not-found) r = bfs(t.right,k) return r