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.
Feck
Love this one! Didn't know there was a counter from collections that could do that. It essentially provides an iterable hashtable, right?
I was hoping for a more mathematical solution, but this is quite pythonic and good.
good.
OK for the first point, but I would believe sorting is done only once.
Added random tests, approve the fork, please.
It's like that in another languages too. All languages share the same kata ranking.
This comment is hidden because it contains spoiler information about the solution
I think you should make it a new kata. Modifying my solution so that it would print out the pieces would be non-trivial.
Heh, our solutions were both counting sort (mine was only so rigorously microoptimised it may not have been transparent), and it pulls 10049 ms in comparison to your 11000, so it wasn't a problem with my code, but rather your tests being too difficult.
Great, hopefully that helps alleviate the issues in your second comment. Thanks for responding quickly and helpfully. When something like just time of day can change whether or not a valid solution passes it really isn't great after all, at least a 50% success rate with a decent solution I'd hope, and no successes at all was what had made me particularly concerned, twenty seven consecutive failures is really quite a lot. Trying again it worked first shot though with a comfortable margin at about 11.3 seconds, so the little leeway to allow for things like that is nice.
Definitely agree it still could warrant a kyu raising though, although I have no idea how that would even happen, I've mostly just been solving katas around here, not helping make them.
It's not me who chose
6 kyu
, altough I wouldn't call this a5 kyu
as well.This depends on the server load, received inputs, and Python version you're using. When the estimated completion time is
12 sec
, even good solutions are not guaranteed to work all the time.I've changed the tests a little to be lighter (at least the completion time dropped for me from 12 to 11 sec).
If you're getting a time-out consistently, then your solution is not efficient enough. (Unfortunately) having a good time complexity is not enough, and solving it may require micro-optimization.
This is definitely not 6 Kyu. It should be 5 at the very least.
This comment is hidden because it contains spoiler information about the solution
Loading more items...