6 kyu

Divide and Conquer

148 of 229saudiGuy
Description
Loading description...
Algorithms
Arrays
Performance
  • Please sign in or sign up to leave a comment.
  • AmirTallap Avatar

    This comment has been hidden.

  • Eddie_Pulido Avatar

    This is a bit tricky for a 6kyu, I'd probably label it as 5kyu

  • ValerioR. Avatar

    Test functions are wrong, it's impossible to attempt the exercise, please fix!

  • ejini战神 Avatar

    Description should be language-agnostic (Regarding example part)

  • foufouboy Avatar

    Very fun kata!

  • ahmet_popaj Avatar

    Pretty tricky kata to solve, well done, keep it up.

  • cwps Avatar
  • AI MAN 228 Avatar

    I have a solution in 6 strings and I always get a time-out. Why!? PLEASE ANSWER

  • Emilio-sakr Avatar

    This comment has been hidden.

  • daviddpatrick Avatar

    My code works but it doesn't meet the 12 second time limit. Any ideas on improving it?

  • ndegz Avatar

    consecutive_nums([1,3,4,5], 2) How is this false?

  • marjan Avatar

    Please c++ translation.

  • Mednoob Avatar
  • bit_buckwheat Avatar

    is it True? Description, Examples, consecutive_nums([1, 2, 3, 6, 2, 3, 4, 7, 8], 3) ➞ True, # [1, 2, 3], [2, 3, 4], [6, 7, 8]

  • Free-Solo Avatar

    This comment has been hidden.

  • mauro-1 Avatar

    Performance tests should be more consistent.

    My solution ranges from 1366 ms to 3569 ms (20 hard tests).

  • Blind4Basics Avatar

    oh, I just saw a lot of solutions got invalidated after your last update. I see you increased the input size by 10... Well, I guess it's still compatible with the rank, but that'd be better to get that straight before publishing.

    Maybe add the performances tag, now?

  • dfhwze Avatar

    This kata is now approvable:

    • 6 kyu - 5 votes
    • 7 kyu - 1 vote
  • dfhwze Avatar

    This comment has been hidden.

  • Blind4Basics Avatar

    Hi,

    Cool one. Missing fixed/sample tests:

    [3, 4, 1, 2, 3, 2, 3, 4, 5], 3 => True
    [9, 9, 7, 3, 3, 1, 1, 1, 2, 8, 8, 7, 2, 2, 3], 3 => True
    [5, 5, 7, 3, 3, 1, 1, 1, 2, 6, 6, 7, 2, 2, 3], 3 => True
    

    Cheers


    Edit: I dug a bit more in the tests generation: as far as I can tell, they will almost never generate valid inputs where several groups are overlapping each others => that should be tweaked.

    side note: x += list(range(...)) -> x += range(...) (doesn't change anything since no performances are involved but... ;) )