June 16th, 2013, 10:19 AM
Join Date: Feb 2013
Time spent in forums: 22 h 38 m 33 sec
Reputation Power: 1
Help with a problem?
Here's the problem:
# Define a procedure, check_sudoku,
# that takes as input a square list
# of lists representing an n x n
# sudoku puzzle solution and returns the boolean
# True if the input is a valid
# sudoku square and returns the boolean False
# A valid sudoku square satisfies these
# two properties:
# 1. Each column of the square contains
# each of the whole numbers from 1 to n exactly once.
# 2. Each row of the square contains each
# of the whole numbers from 1 to n exactly once.
# example of an input -
#"incorrect = [[1,2,3,4],
Now, I've thought about breaking this problem down to two parts -- 1st will check for rows, the 2nd will check for columns.
EDIT: The first one is done, I need a solution for the second one(columns).
Thanks, in advance.
Also, if you have a better approach to solve the problem, then you are most welcome.
Last edited by Akshat1 : June 16th, 2013 at 10:21 AM.