Added bfs based problem.