Solved Shortest Path Problem with BFS