I have the following list representing a custom set of cards:
Each card is represented by a list of two elements, like this: {heart,9}
Using the code:
Subsets[deck, {5}]
I have received a list of all the possible hands of 5 cards you can have, which totals to 1 712 304 possible hands.
I now have a list containing 1 712 304 lists of 5 cards, which are also lists of 2 elements. I now want to sort each hand separately by the number on the cards, ignoring their colors. The order of the hands does not matter, only that each hand is sorted by number internally.
I tried the following code:
Sort[hands, #1[[2]] < #2[[2]] &]
But that did not work out.
Thank you in advance.