Skip to content

Commit cfc5076

Browse files
committed
chore: correct x,y coordinates
1 parent 2a1e633 commit cfc5076

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

_2025/solutions/day07.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ def find_start(self, grid: list[list[str]]) -> tuple[int, int]:
4141
------
4242
ValueError: If no 'S' cell is found in the grid
4343
"""
44-
for y, row in enumerate(grid):
45-
for x, cell in enumerate(row):
44+
for x, row in enumerate(grid):
45+
for y, cell in enumerate(row):
4646
if cell == "S":
4747
return (x, y)
4848

49-
err_msg = "No 'S' start cell found in grid!"
49+
err_msg = "No start cell 'S' in the grid!"
5050
raise ValueError(err_msg)
5151

5252
def part1(self, data: list[str]) -> int:
@@ -65,7 +65,7 @@ def part1(self, data: list[str]) -> int:
6565
int: Number of times splitters are activated across all rows
6666
"""
6767
grid = [list(row) for row in data]
68-
start_col, start_row = self.find_start(grid)
68+
start_row, start_col = self.find_start(grid)
6969

7070
beams: set[int] = {start_col}
7171
count = 0

0 commit comments

Comments
 (0)