removed debug message, fixed grammar error
This commit is contained in:
parent
c8dc6578f9
commit
57b61da0bc
1 changed files with 1 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ def check_xmas_from_pos(grid: list, row: int, col: int,
|
|||
if new_col < 0 or new_col >= len(grid[0]):
|
||||
return False
|
||||
|
||||
# go deeper into recursion with one less letter on the search string
|
||||
# go deeper into recursion with one less letter in the search string
|
||||
return check_xmas_from_pos(grid, new_row, new_col, direction, xmas_letters[1:])
|
||||
|
||||
|
||||
|
|
@ -47,7 +47,6 @@ def get_xmas_appearances(grid: list) -> int:
|
|||
for col in range(len(grid[0])):
|
||||
for direction in directions:
|
||||
if check_xmas_from_pos(grid, row, col, direction, xmas_letters):
|
||||
# print(f"Found XMAS at position ({row}, {col}) in direction {direction}")
|
||||
xmas_appearances += 1
|
||||
return xmas_appearances
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue