employer cover photo
employer logo
employer logo

Palantir Technologies

Is this your company?

Palantir Technologies Interview Question

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.

Interview Answer

Anonymous

Apr 4, 2014

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

1