• Custom User Avatar

    You should check your Big O Notation (O) of your algorithm, if it is O(n^2) then your code will got an erro timed out.
    The complex of algorithm should be O(n) or O(nLog(n))

  • Custom User Avatar

    There's no such fixed test in JavaScript, and the random tests are correct.

  • Custom User Avatar

    That's not a kata bug, it's your code's problem:

    Performance needs to be considered

  • Custom User Avatar

    Same bug here in C++, I've got a timeout.

  • Custom User Avatar

    Any addition might overflow/underflow, including operator +.

  • Custom User Avatar

    It is simply returned by copy.
    When the return occurs, the std::vector initialized in the test (invisible here) receives a copy of all elements of ret vector.

  • Custom User Avatar

    The most elegant to me as it uses the pure mathematical definition of what are hours, minutes and second. And this also might be the most efficient.