How GPS Navigation Works - BFS and DFS