Ad
  • Custom User Avatar
    • Update description to current state

    • Added random tests

    • Added assertion messages

    • Reorganize test structure

  • Default User Avatar

    The available tests do not cover all cases. it would be nice to add the test 'aabacacacacacacac'

  • Default User Avatar

    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

  • Custom User Avatar

    Absolute annoying that we must guess which exception to be raised. Put a little more work into Kata's u created pls.

  • Custom User Avatar

    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.

  • Custom User Avatar

    You should return the original list and not its copy. OP solved it though, closing...

  • Custom User Avatar

    Python: No random tests

  • Default User Avatar

    Im getting a time out failure with no apparent issues

  • Default User Avatar

    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.

  • Default User Avatar

    Отличный ката. Спасибо автору.

  • Default User Avatar

    I made two forks that address mutability:

    1. Immutable dataclass Node - being immutable makes it very simple
    2. Check for mutation - complicated mess, obviously

    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.

  • Default User Avatar

    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.

  • Custom User Avatar

    no that is.. correct. it'll cause a throw when a throw is asked for

    WAT. No way it causes the correct type of error?

  • Default User Avatar

    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.

  • Default User Avatar

    no that is.. correct. it'll cause a throw when a throw is asked for which otherwise wouldn't happen.

  • Loading more items...