Skip to content

Commit

Permalink
refactored sudoku_solver.py
Browse files Browse the repository at this point in the history
  • Loading branch information
IsxImattI committed Nov 10, 2024
1 parent d89aef3 commit 466d992
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions data_structures/arrays/sudoku_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ def cross(items_a, items_b):
+ [cross(rs, cs) for rs in ("ABC", "DEF", "GHI") for cs in ("123", "456", "789")]
)
units = {s: [u for u in unitlist if s in u] for s in squares}
peers = {s: set(x for u in units[s] for x in u) - {s} for s in squares}

peers = {s: {x for u in units[s] for x in u} - {s} for s in squares}

def test():
"A set of unit tests."
Expand Down

0 comments on commit 466d992

Please sign in to comment.