Question d’entretien chez Microsoft

BFS on a binary tree

Réponse à la question d'entretien

Utilisateur anonyme

6 août 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