Ad
  • Default User Avatar

    Here you sort ALL the 50 millions element and after you had to compare the digit (not linear for sur).

    But all you have to do is to look element by element and find the first one who is not asc (linear).

    Sorry for my english

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Probably it's the most fastet solution. Can you explain please why do you think that this solution is slow?

    test on a list of len 50 millions

    your decision took time: 2.390636682510376

    supposedly slow decision took time: 1661070264.348622

    your decision longer on 1.7343978881835938

  • Default User Avatar

    weird how you got dislikes. i even had 7kyu challenges that are harder than this one. 6kyu - 7kyu sounds more accurate.
    note even sure why some people struggle with this one because its really straight forward (no mathematical trick, no algorithmic trick, no performance issues).
    maybe some people dont know how to play sudokus and have a hard time understanding this problem.

  • Default User Avatar

    Maybe not that faster but definitely less memory-expensive!

  • Default User Avatar

    Yeah you're right, I didn't think about that at first and I submitted a solution that uses len instead of count later on

  • Default User Avatar

    Naming variables correctly is the most difficult task in a programmer life

  • Custom User Avatar

    A-well-a everybody's heard about the bird!
    B-Bird bird bird, bird is the word
    :-)

  • Custom User Avatar

    I don't think it's a good idea, the description says nothing about empty lines, leading spaces, etc. I think the original state of mind behind this kata was simply not to fool users with implausible cases, like this. However, this kata is now old and has been completed more than 30 k times, its design won't be changed.

  • Default User Avatar

    I apologize!

  • Default User Avatar

    No problem but why did you downvote my post? I looked at the description and saw nothing about "extremely big tests", I didn't look at the tests themselves... I will change these names.

  • Default User Avatar

    Since "extremely big number"...

    Did I promise that? Not everybody is as smart as you are:-) Anyway it is too late to change tests when so many people passed the kata.

  • Default User Avatar

    Understood when I saw your first solution. Added a test.

  • Default User Avatar

    I don't understand your post. Please could you be clearer, maybe with an example?

  • Custom User Avatar

    Tests let pass wrong solutions

    Any example?

  • Loading more items...