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.
You are not right, beacuse the words have different lengths...
The one letter word 'i' should score 9.
The two letter word 'be' should score 7.
If you don't take away the 96, you would get 105 for 'i' and 197 for 'be'.
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.
You are right. But error handling was not part of the Kata, so all is good.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It is a list with one element "node".
Loading more items...