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.
Отличный ката. Спасибо автору.
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.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.
WAT. No way it causes the correct type of error?
if you look at my (python) solution though, THAT is incorrectly passing, as it doesn't return the nth node, but a node containing the value that the nth node contains
this issue probably applies to most if not all languages.
one might argue that it's out of scope. it's not. they ask for the node, not the data. if they wanted the data they should have asked for the data. and then test for what's asked for. nor is it a nitpick about python's concept of identity. this function spec is similar to
drop
, but that is not at all what my solution does.bonus issue: poor formatting in python's initial code. never fails to annoy me.
no that is.. correct. it'll cause a throw when a throw is asked for which otherwise wouldn't happen.
This comment is hidden because it contains spoiler information about the solution
Very challenging kata, congratulations, well done.
This took me quite a while, I only have great amount of experience in logical katas that use functions only. But had a trickle with OOP and Class related katas. Great that I can practice my weaknesses with this kata.
Gosh. Younger me was an asshole. xd
Unnecessary "RTFM".
Concepts are correct, names are wrong. Nothing to be done about it though.
Closing.
push
is specified correctly, after that's, it's just a name. "push" is not even the only misname in there. but I don't think any of this is going to be changed now.Closing.
python new test framework is required. updated in this fork
This comment is hidden because it contains spoiler information about the solution
It was hard
Loading more items...