Ad
  • Custom User Avatar

    oooooh. know I get it. You should add this example to the instructions for people like me :)

  • Custom User Avatar

    And another problem. Input:

    arrayOfArrays: [[71, 39, 28, -91, -6], [-77, 24, 29, 51, -90], [-78, -81, 10, -13, -54], [55, -17, 7, -45, 58]] 
    shift: 2
    

    So algorithm is something like:

    [71, 39, 28, -91, -6]
                [-77, 24, 29, 51, -90]
                            [-78, -81, 10, -13, -54]
                                           [55, -17, 7, -45, 58]
    

    And the result is: [71, 39, 28, -168, 18, 29, -27, -171, 10, 42, -71, 7, -45, 58], but test expects: [71, 39, -49, -67, -55, -30, -25, -30, -47, -45, 58]
    I can be mistaken, but I guess with shift = 2 and arrays size = 5, the first 3 elements of the first array must be in the result. So the result array must start with [71, 39, 28...], when test expexts [71, 39, -49...]. Why?

  • Custom User Avatar

    Now everything is correct with sizes! Thanks!

  • Custom User Avatar

    In the Ruby version something is wrong with tests. Or I missunderstood something. The instructions says: "The arrays in the array will all have the same size and this size will always be greater than 0.", but i get arrays with different size. Example input:

    arrayOfArrays: [[7, 73, -58, 1, 49, -10, -55, 16, -78], [-48, -69, 40, 99, -88, 73], [-34, -79, 70, 98, 25, 100, 12, 38, 17, 2]]
    shift: 1