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.
Cases added. Thank you for your help.
ok add that one instead, make sure to add the other two in fixed tests on submit; might be better idea
I can add these two cases, but I don't want to add some very big test cases into samples test.
If I add this:
The length should be 21, not 22.
Would this one fit?
Otherwise I'll just add those two.
Please add these test cases in sample tests:
I fixed this point, thank you for pointing it out.
Any other thing that could be improved, please let me know.
The way the sample tests are set up make it annoying to add our own test cases. It would be nicer if it were refactored so that the searched word was included in the tuple.
You are trying to return
2when n is3, but there are 2 numbers in middle row, center does not exist.Not a Kata issue.
Very likely not a kata issue.
Try https://docs.codewars.com/training/troubleshooting/
Not sure what's wrong with the Pythonic version, I keep failing when the input is
2and8but locally I get the right output. Weird.We'd still vote 7kyu no matter what fwiw. The optimisation is the most trivial observation possible.
You're right. My intention was to make it a 7 kyu kata, which is why I was a bit lazy with the random tests. Anything over 10^4 would make it a 6 kyu.
Feel free to create a fork—I'll approve it.
This comment is hidden because it contains spoiler information about the solution
In Python, just notice that no matter the user solution returns an
intor astr, both may pass the test, is this okay?Invalidated because of changes to testing system: change list to a set in your solution if you wanna have it validated.
Maybe put
{2, 3, 10, 30}as a sample test?Loading more items...