Ad
  • Custom User Avatar

    Fixed (should be upgraded to Ruby 3 and RSpec anyway), but I'll retire the kata anyway.

  • Custom User Avatar

    I'll retire the kata. It's old and has been superceded by this.

  • Custom User Avatar

    This is a confusing kata. There are no provided tests in JS and the provided comment and function header don't match the instructions. The submission tests pass in values that aren't numbers without that having been explained in the instructions. I was able to pass by hardcoding the solution, so there are insufficient random tests.

    After fixing these issues, I'm still not sure the concept leaves much interest or originality. There are many other map/sort kata.

  • Custom User Avatar

    Sorry, I don't really follow--in the other kata, more than one pair can be the solution. In yours, the return value requires slightly more specific bookkeeping, but that's immaterial to the main algorithm--summing the indices is a superficial difference.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This was marked as resolved, but the name is still camelCase.

    Actually, the adjustments throughout the thread appear to only have been applied to submission tests, not sample tests, which still use 6969 as a flag for "not found".

    Returning -1 isn't great, either, since there's no reason the algorithm shouldn't work on negative numbers. Better to raise or return None.

  • Custom User Avatar

    It seems unusual/impractical to return a list of strings delimited by dashes. Normally, I'd expect the function to return a 2d list of numbers so it's maximally usable by the caller. If the caller wants to join it for display purposes, that's up to them.

  • Custom User Avatar

    The description doesn't say anything about returning null for empty arrays. This is only discoverable by submitting.

    I'm not sure what this means:

    Consider all possible array iterations with numbers or empty.

  • Custom User Avatar

    Is someone removing tags from this challenge? I've tagged it multiple times with 'algorithms' and 'strings', which appear to be appropriate (if not, please tag them with something else rather than removing the tags entirely), yet after a day or two it shows back up in the untagged kata list.

  • Custom User Avatar

    Those aren't filtering objects by a property as in this kata. I'm 97% sure I've seen a JS object filter challenge somewhere though...

  • Custom User Avatar

    This does seem likely to be a dupe but I wasn't able to find anything obvious after poking around for a minute. If we can find a concrete dupe, that should bring some clarity to the discussion here.

  • Custom User Avatar

    ReferenceError: test is not defined in the sample test. You can use the working submission tests to write the sample.

    Missing random tests.

  • Custom User Avatar

    Typo: "opperations" should be "operations". Usually functions have verb names, so I suggest using perform_operation or similar.

    The test labels don't match the tests:

    @test.describe("Random Test Cases")
    def fixed_tests():
        @test.it('Random Tests')
        def basic_test_cases():
    

    "Random tests" should be "Fixed tests" or "Basic tests".

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Loading more items...