Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
I can confirm that the reference solution is faulty as well (from my own solution).
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.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!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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
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
This comment is hidden because it contains spoiler information about the solution
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
I am confuse
Which of my
threefour solutions is not supposed to pass?This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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 :)