add comment

This commit is contained in:
Dmitry Fedotov
2025-01-06 02:20:38 +03:00
parent 8b2c3bdfa1
commit c15defa16e

View File

@@ -43,7 +43,7 @@ class Maze:
def search(m: Maze) -> int:
x, y = m.start()
state = (x, y, 1, 0)
state = (x, y, 1, 0) # x diff is 1 (we are facing right), y diff is 0
queue = []
visited = set()
@@ -75,6 +75,7 @@ def search(m: Maze) -> int:
visited.add(state)
heapq.heappush(queue, (cost, state))
return -1
def solve1(lines: list[list[str]]):