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 can be observed with a string as small as 30 brace sets.
I think using minutes as a discrete unit is hacky and against the spirit of the kata. Just my irrelevant opinion ;)
Description insists on highest rank first (ace in your example), it doesn't specify that rank of cards inside a combination has a greater priority that a rank of card outside combination.
Anyways, here is a fork correcting this corner case.
I can't reproduce your example, seems returned order is correct but I see your point
sorted(map(PokerHand, ['QS QD QH QC 3C', 'JS JD JH JC AC'])) == ['JS JD JH JC AC', 'QS QD QH QC 3C']
Note that kata description explicitely states:
People, try to run this on your local machine. It takes way too much time.
What are you suggesting?
And you forgot the "most important" part (let's rather say, the suggar on top of the complexity garbage ;) ): each control call for the
while
loop will iterate 3 times through the whole remaining string by itself. Really the worst possible thing to do with this approach. ;)