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.
Pretty funny concepts to figure out, nice kata.
I'm OK with both
I think we asked this on Discord ages ago, but for translations do you prefer to keep the cards as strings or is a dedicated card type permissable?
If all of the cards' values belonging to any one suit in one string correspond to all of the cards' values of any one suit in the other string, there is 1:1 mapping. If that is true for all suits appearing in either string, without re-using cards in more than 1 mapping, then return
true
. This implies that the strings have equal counts (0 <= n <= 4) of cards having the same value, and thus the strings have the same total number of cards and thus the same length. The "hand" isn't scored or ranked.made a small change to the description and accepted
C Translation
That's a nice Puzzle and really good coding exercise.
Even though the strategy is simple, it requires A LOT of precision in both thinking and coding.
I think the description would really benefit from clarification that inputs will be easy / random and not adversarial.
The solutions (at least mine and the top voted one) seem to time out on
stupid_input(10)
, let alone 150.That's a very nice test-map.
I run a 10^6 simulations of a try-random-move-from-options-at-any-point solver and it finds the solution roughly once in 4000 attempts.
It helped me avoid trying a lot of bad heuristics, and to find a relatively elegant approach to the puzzle.
I don't have an idea for an algorithm that would be significantly faster than a naive solution.
if you do then go ahead and create a performance version :)
This comment is hidden because it contains spoiler information about the solution
As I recently mentioned on discord, I changed my mind. Do what you think is the best
I don't understand what i'm supposed to do with the suits. I don't understand how are some not isomorphic and some are. The hand rank does not change
These boards aren't isomorphic:
So the hearts on the first board aren't isomorphic to any suit on the second board
I didn't quite understand this part. If you change
3h
to3c
in the first suit, they become the same, hence isomorphic, and there are no otherh
's in the first suit. Is it the problem with the second suit, where if you swapc
withh
,8h
and8c
become different? Or anything else?Loading more items...