Write An Algorithm For Bfs