|
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).
|
|
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. |