Want a Free Job Posting?

Buy a job posting today and the second one is on us. For a limited time only. Act Now.

Interview Question

Interview Redmond, WA

BFS on a binary tree


Interview Answer

1 Answer


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

Anonymous on Aug 6, 2010

Add Answers or Comments

To comment on this, Sign In or Sign Up.