Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
...So copilot copied my work? I wrote this many years before copilot existed.
It passed all tests, so the problem is that the tests did not include all cases.
You are right. When I did these puzzles, years ago, I was following a style of brevity. The recursive call saves a line.
Does it? It passed all the tests.
This comment is hidden because it contains spoiler information about the solution
Blank lines and whitespace aid readability, but, I think I should have cut out the first one.
This is codewars, part of the challenge is (or was when I was active here, years ago) to solve in a concise style.
Thanks.
Because you do not move through the input like that.
This comment is hidden because it contains spoiler information about the solution
The key arg of max takes a function. The lambda is that key function. The return value of the key function is used to find the max.
This comment is hidden because it contains spoiler information about the solution
I don't follow PEP8 in codewars either.
You have not followed standard PEP8 layout. e.g. move==end should be move == end, adding an elif after a retun and having a statement on same line as an else.
Comments shoud have a space after the #
Like this
Commenting the obvious is not helpful. e.g # Inititializations... abolve the place where code is initialised is redundant. Adds to cognitive load.
I have made these comments with good intentions.
This comment is hidden because it contains spoiler information about the solution
You are right that it can not solve all sudokus - BUT the Kata explicitly states that it need only solve easy sudokus.
"...The Sudokus tested against your function will be "easy" (i.e. determinable; there will be no need to assume and test possibilities on unknowns) and can be solved with a brute-force approach...."
It works for the test cases, hence solves the Kata.
You are right, but, those edge cases do not need to be handled as the code passes all the tests.
Loading more items...