n queens

Sign up for a GitHub account Sign in All Gists lykkin / gist:2c514c3440262243c420 Created May 18, 2015 Code Revisions 1 /.sunken-menu-group /.sunken-menu-contents Embed HTTPS SSH You can clone with HTTPS or SSH . Download Gist /.only-with-full-nav n queens View gist:2c514c3440262243c420 gistfile1.py Raw File suppressed. Click to show. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 def output_board ( board ): for row in board: print ' ' .join( map ( str , row)) def place_queen ( board , coordinate ): new_board = [] for row in board: new_board.append(row[:]) x,y = coordinate for c in range ( len (new_board)): ...

Linked on 2015-05-18 20:31:05 | Similar Links