Domanda di colloquio di Punch (CA)

Sort the array as per the rules of card game using generic method