The input cards for Player 1 are: J of D J of H Q of H Q of C 3 of D The input cards for Player 2 are: 2 of H 2 of D K of H K of D K of C The sorted cards for Player 1 are: 3 of D J of D J of H Q of C Q of H The sorted cards for Player 2 are: 2 of D 2 of H K of C K of D K of H Player 1 has Two Pairs Player 2 has Full House Player 2 wins The best hand of five cards out of the 10 cards is: Q of C Q of H K of C K of D K of H Best five cards have Full House