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.
That's an issue with your solution, not with the kata.
This comment is hidden because it contains spoiler information about the solution
fork approved
done
Should
"A۱"
count as"A1"
? I see some python solutions that convert the second character to int, and"۱"
converts to 1Of course, the invalid input requirement is dumb, especially non-strings or strings that don't describe a location in a coordinate system. But if you're gonna have it...
all fixed
I found the error. Thank you:)
As funny as I think it is to find a comment like this on a g964 kata, I see no issue here. Part of solving a problem is identifying what the problem is. There's no obligation to describe the problem in as simple terms as possible.
Some description problems:
drop "non-null". null is not an array. You also don't need to mention that the array isn't going to be a giraffe, tea cup, or banana.
--
I would rather see function, or drop the word entirely, but this is nowhere near as offensive as the null thing
--
nowhere in the description does it say that there can't be gaps in the tree, such as:
->
If the sum of a chunk's digits is divisible by 2
There was an issue about it 7 years ago which for some reason got marked resolved.
You've got plenty to go on though. Compare the two results. Do it manually/consider which is correct. Read instructions.
don't do bad things with memory /shrug
might want to reproduce it locally where you have access to more tools.
or use a different language that has better memory safety if this isn't something you want to deal with
I made two forks that address mutability:
Both expect specifically
IndexError
. Unclear whether that change should be made though. It's not necessarily incorrect by codewars standards to raise an unspecified exception, and this breaks the vast majority of solutions, including ones that I would consider completely correct with the current spec.As a bonus this solution works for infinite lists and negative index because it'll hit recursion limit. (doesn't work as great for high indices though)
Unspecified. The choices of excption type look strange across the board. java accepts any exception type according to description (haven't looked at tests) and C# doesn't use IndexOutOfRangeException which I assume is more appropriate and PHP might have something like that exception too instead of InvalidArgumentException .. OutOfRangeException looks to be a thing. Ruby accepts both throw and raise for some reason.
Some languages return the data which seems more in line of the intent of the kata, while others the entire node, but don't bother checking if it's the correct node.
This is fine.
Loading more items...