Ad
  • Custom User Avatar

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

  • Custom User Avatar

    I can confirm that the reference solution is faulty as well (from my own solution).

  • Custom User Avatar

    Even random tests almost never generate highly disconnected graphs, usually the expected value is around 0-5, so a brute-force solution might have hopes to work.

  • Default User Avatar

    Hi! I've cross checked a few of these between mine and your code. Some of them are actually equal but, like you said, some are different. Give me a day or so to look further and see which is correct :)

    Thanks!

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    yeah no i take it back. turns out [min(ls), max(ls)] defaults to te same (but lower level) algorithm in c. So this kata just doesn't work in python

  • Default User Avatar

    hiya. yeahhhh ive taken it down for now.
    the point of this kata is that you can actually solve this by looking at pairs of numbers and then comparing the smaller of those to the current minimum and the larger to the current maximum. The only problem is the time complexity is the same as the straight forwad solutions and there's only about a 1.5x time difference between the fast and 'slow solution'. So making tests that only pass the faster one is pretty difficult. I've taken it down and I'l see what i can do

  • Custom User Avatar

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

  • Custom User Avatar

    If even with the correct answer you might need to run it a few times as the tests cut it very close
    What does this mean? ^^ seems straightforward

  • Custom User Avatar

    I am confuse

    Which of my three four solutions is not supposed to pass?

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    Hey! You're the first person to complete this kata and i was just wondering.
    Could you try explain your code? I'd be really grateful since I don't actually have any reason to think my solution is the best way to go about it and would love to compare.
    Thanks :)