treewide: fix 'dijkstra' typo
The downside of copy-pasting snippets from previous solutions :').
This commit is contained in:
parent
7dee19ff44
commit
b4d9ecf0a5
10 changed files with 20 additions and 20 deletions
|
|
@ -73,7 +73,7 @@ def solve(input: str) -> int:
|
|||
graph = to_graph(paths, post_process_gates(letters, paths))
|
||||
return graph, next(iter(gates["AA"])), next(iter(gates["ZZ"]))
|
||||
|
||||
def djikstra(start: Point, end: Point, graph: Graph) -> int:
|
||||
def dijkstra(start: Point, end: Point, graph: Graph) -> int:
|
||||
# Priority queue of (distance, point)
|
||||
queue = [(0, start)]
|
||||
seen: set[Point] = set()
|
||||
|
|
@ -94,7 +94,7 @@ def solve(input: str) -> int:
|
|||
assert False # Sanity check
|
||||
|
||||
graph, start, end = parse(input.splitlines())
|
||||
return djikstra(start, end, graph)
|
||||
return dijkstra(start, end, graph)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ def solve(input: str) -> int:
|
|||
graph = to_graph(paths, post_process_gates(letters, paths))
|
||||
return graph, next(iter(gates["AA"])), next(iter(gates["ZZ"]))
|
||||
|
||||
def djikstra(start: Point, end: Point, graph: Graph) -> int:
|
||||
def dijkstra(start: Point, end: Point, graph: Graph) -> int:
|
||||
# Priority queue of (distance, point, level)
|
||||
queue = [(0, start, 0)]
|
||||
seen: set[tuple[Point, int]] = set()
|
||||
|
|
@ -112,7 +112,7 @@ def solve(input: str) -> int:
|
|||
assert False # Sanity check
|
||||
|
||||
graph, start, end = parse(input.splitlines())
|
||||
return djikstra(start, end, graph)
|
||||
return dijkstra(start, end, graph)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue