Are you sure it is breadth first search and not best first search as best first search is actually an greedy algorithm.