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 ;)
I thought something fishy with these Dijkstra solutions,
but if max degree is 4 there's not much fine for multiple pushing
of the same node into the heap.
And if max dimension for a test case is 50, you can also get away
with running a linear search for the minimum on a list instead
of a heap :D
Instructions are not clear.
Does the monster makes a move after every move you make?
And what does:
Means?
Description says:
Anyway, good job buddy.
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.
You did reproduce my example. In this kata the hands should be ordered from strong to weak.
Returned value for:
Should be False.
Suits are irrelevent in this example.
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:
This comment is hidden because it contains spoiler information about the solution
Intresting tricks here, but the test cases must be really weak
if this one pass.
It does not properly distinguish between hands of the same caliber:
'QS QD QH QC 3C' < 'JS JD JH JC AC' => False
People, try to run this on your local machine. It takes way too much time.
What are you suggesting?
Oh brother...(sigh)
“All happy families are alike; each unhappy family is unhappy in its own way.”
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. ;)Loading more items...