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.
Update description to current state
Added random tests
Added assertion messages
Reorganize test structure
The available tests do not cover all cases. it would be nice to add the test 'aabacacacacacacac'
Why is my code passing some tests but not passing some other tests?
Did I understand the question wrong?
what I understood is that I should remove all duplicates and that's what I think my code is doing
Absolute annoying that we must guess which exception to be raised. Put a little more work into Kata's u created pls.
JDeBolt, your descriptions are awful. What front and back arguments are here for? I managed how to split the list, now I have to waste my time to realize how to connect the solved tasks with your useless extra arguments to pass the tests.
You should return the original list and not its copy. OP solved it though, closing...
Python: No random tests
Im getting a time out failure with no apparent issues
I should such katas should be deleted as an examples of bad description, bad style (why on Earth author is using the name which is used in JS to push data to the end of the sequence to push it to beginning?) and bad code.
Отличный ката. Спасибо автору.
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.
Loading more items...