Skip to content

Instantly share code, notes, and snippets.

View timerickson's full-sized avatar

Tim Erickson timerickson

View GitHub Profile
BOARD_SIZE = 8
def under_attack(col, queens):
left = right = col
for r, c in reversed(queens):
left, right = left - 1, right + 1
if c in (left, col, right):
return True