Ad
  • Custom User Avatar

    Not sure if a specification changed in the last 4 years but yeah, this kata is entirely solvable in C#.

  • Custom User Avatar

    can you please write up a test case that would satisfy that to which you are referring?

  • Custom User Avatar

    Yes, and there are input constraints specified but there are no test cases to cover this. I am referring to this: "Input constraints: 0 <= h <= 23, 0 <= m <= 59, 0 <= s <= 59"

  • Custom User Avatar

    YOU DO NOT MANIPULATE THE ITERATOR WITHIN A LOOP(IF YOU DO NOT KNOW THE CONSEQUENCES)! ;-)

  • Custom User Avatar

    That's just the point, we do not always know the consequences of manipulating the iterator. ;)

  • Custom User Avatar

    If we know the consequences of manipulation, why not? ^_^
    Author said:

    However, there is a bug in the method that needs to be resolved.

    So our goal is to change a place, let the function work, right?
    As your solution, should be called override or refactor @_@
    In fact, the most important reason is that we are lazy, we do not know shame :D:D:D

  • Custom User Avatar

    Whoever voted for "best practice" should be ashamed of themselves. YOU DO NOT MANIPULATE THE ITERATOR WITHIN A LOOP! Yes, this is all caps because a sentence like this justifies the use of all caps. :P
    About the only thing worse than doing this would be to jump out of a loop with a goto.

  • Custom User Avatar

    It's a shame that the issue is known for over 4 months and still hasn't been fixed. Also what I really don't understand is why my solution didn't work even though it was EXACTLY THE SAME as one of the working solutions. WTH?!
    After I forfeit this one I tried my solution again and this time it worked fine. Um, what? :(

  • Custom User Avatar

    The same here, all tests passed, but I always receive timeout, even with different solutions.

  • Custom User Avatar

    With simply adding each number it times out at 12345 for me. My original idea gets up to 12345678 before timing out. If it's solvable in C# I may try to find a faster solution. If I can come up with one..

  • Custom User Avatar

    I don't know if this has been updated, but I have been able to solve this problem. Perhaps you are summing number by number? There are more efficient ways!

  • Custom User Avatar

    Me2.
    I got up to:

    When12345678 Then381115683

    How far did you get?

  • Custom User Avatar

    for the same to me!
    i'm disappointment!!

  • Custom User Avatar

    More test cases needed, also should make use of double instead of int, especially when dealing with milliseconds. Also, the description is a bit unclear. "Past what?" was the first question I asked myself.
    Oh, and maybe tell people to NOT use magic numbers when coding. ;)

  • Custom User Avatar

    I'll be bold and claim that this one CANNOT be solved in C#, since the test cases are too big. I tried many different approaches, some fast ones, some not so fast ones. It would ALWAYS time out for taking longer than 6000ms. I forfeit and copy pasted some of the solutions and guess what? NONE OF THEM would pass the test cases. Some would time out, some wouldn't work at all (error message for numbers > 9). This kata should be taken down for C#.

  • Loading more items...