I see that Peter goes through each column and row for every single digit. My idea is to take every row and every column as a separate list, sort them, and check if the digits go from 1 to n. Please comment on the efficiency / correctness of my solution (it's judged correct by the system).
asked 14 Mar '12, 18:42
I guess I don't understand why you need to sort the lists in order to check them. I realize it's computationally insignificant for what we're doing, but you can just run a for loop over the range of the length of the list and check that the number is there.
answered 14 Mar '12, 18:47