IBI Group interview question

asked about basic algorithems (bfs / dsf).