6 kyu

Group in 10s

415 of 1,091matthewglover
Description
Loading description...
Arrays
Lists
Fundamentals
  • Please sign in or sign up to leave a comment.
  • Cloud Walker Avatar

    The example strongly implies that empty slots should be filled with 'undefined' but the solution reveals empty slots are to remain empty. Description should state "Empty slots are to remain empty".

  • ibrahram Avatar

    HI all, I just figured out how to check the tested input and its awesome :)

    however I am struggling here to find out how to replace the undefined or empty arrays (groups that are empty but not at the end of the groupings array).

    So like instead of: [[1,2,3|,[12,15],,[34,37]

    I have [[1,2,3|,[12,15],undefined (or []),[34,37]

    Can somebody help me please? I really worked many hours on this issue and I would love to be able to submit it :)

    Thanks, Ra

  • FerPC92 Avatar

    I really enjoyed this kata, thanks!

  • ibrahram Avatar

    hi all, I have solved the issue on JS in my visual code studio but cannot pass the tests.

    for example this input: console.log(groupIn10s(1,12,24,17,41,62,99,73,3)); gives this output:

    [ [ 1, 3 ], [ 12, 17 ], [ 24 ], undefined, [ 41 ], undefined, [ 62 ], [ 73 ], undefined, [ 99 ] ]

    I think i don't know yet (new here) how to test and run codes.

    Can somebody pls help me? Thanks

  • arrakis1985 Avatar

    Too sad that there is no php version for this

  • demakov.nk Avatar

    python why is there no arguments in this function? and why the test arguments are just comma-separated numbers? should it be a list? please, correct me if i'm wrong

  • JohanWiltink Avatar

    LC translation

    This translation modifies the description

  • Joec05 Avatar

    it's a pity I almost got everything right except for that whitespace for an empty array

  • farhanaditya Avatar

    JS: Users can modify the inputs.

  • farhanaditya Avatar

    JS: Node v14 should be used along with its appropiate assertion tools (Mocha + Chai). Refer to this and this

  • Bean42 Avatar

    It would be more challenging if the numbers was higher than 100.

    but still a good 6kyu kata anyways.

  • tsp888 Avatar

    jesus........ i just pretty much brute forced my way into a solution.

    This felt way way harder than other 6 kyu problems

  • user9644768 Avatar

    Ruby 3.0 should be enabled.

  • B1ts Avatar

    It should be mentioned how high numbers will be tested. For python it's only up to 100 (why not higher?), IDK about others.

  • user5036852 Avatar

    C#-Translation kumited!

    https://www.codewars.com/kumite/57d66b6f1a6282a1580001a6

    Please check and approve it! :-)

  • user5036852 Avatar

    Great kata! Thanks!

  • sfr Avatar

    Python instructions are missing an example of required output.

  • bkaes Avatar

    Why grouped[4] = null? Why not grouped[4] = []? That way, all elements of your result would be arrays.

  • GiacomoSorbi Avatar

    Upvoted, ranked, translated; thanks for your work matthew :)!