Ad
  • Custom User Avatar

    Could you rename it into "Snail Traversal" in the description? Calling it "Snail Sort" is being sloppy with terms that have meaning and needlessly confusing. I just showed it to a friend, and they immediately fixated on this.

  • Custom User Avatar

    Test error when empty error. May be the test needs a correction.

  • Custom User Avatar

    Surprisingly fun kata, very enjoyed! The empty array in an array edge case input really confuses me. I was dissapointed when I got the whole thing working except for the empty array in an array test. I guess I don't really understand how to work with an array with only an empty array in it in Java.

  • Custom User Avatar

    I had already done more than half of the answer and it has not been saved ;(

  • Custom User Avatar

    finally solved it and each time i look at all the papers i used and how complex is my code i think i am a freaking genius , tht s all i ve to say

  • Custom User Avatar

    This is specified in the description:

    NOTE 2: The 0x0 (empty matrix) is represented as en empty array inside an array [[]].

  • Custom User Avatar

    Given an n x n array,

    Attempt gives [[]] which is not n x n (it is 0 x 1 array)

    No tests with n x m array. Please fix description

  • Custom User Avatar

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

  • Custom User Avatar

    Had a lot of fun !

  • 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

  • Custom User Avatar

    I've fixed it so that solvers can use clpfd.

  • Custom User Avatar

    It looks like you are just taking a 2D array and turning it into a 1D list that is sorted (which is not what the Kata is asking).

  • Custom User Avatar

    my problem is I am having partial success, so the code works for some nxn array, seemingly...
    here is whst i get:

    Test Results:

    Fixed tests
    Tests

    Test Passed

    Test Passed

    [1, 2, 3, 4, 5, 6, 7, 8, 9] should equal [1, 2, 3, 6, 9, 8, 7, 4, 5]
    [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25] should equal [1, 2, 3, 4, 5, 10, 15, 20, 25, 24, 23, 22, 21, 16, 11, 6, 7, 8, 9, 14, 19, 18, 17, 12, 13]

    [1, 2, 3, 4, 5, 6, 20, 21, 22, 23, 24, 7, 19, 32, 33, 34, 25, 8, 18, 31, 36, 35, 26, 9, 17, 30, 29, 28, 27, 10, 16, 15, 14, 13, 12, 11] should equal [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36]

  • Custom User Avatar

    Given an n x n array, return the array elements arranged from outermost elements to the middle element, traveling clockwise.

    Isn't it the other way around? The input is a n x n array (or List for Python) and the output is a 1D list.

  • Loading more items...