Implemented BFS and A* Algorithm