 One application for stable sorting algorithms is sorting a list using a primary and secondary key.For example, suppose we wish to sort a hand of cards such that the suits are in the order clubs (♣), diamonds (♦), hearts (♥), spades (♠), and within each suit, the cards are sorted by rank.This can be done by first sorting the cards by rank (using any sort), and then doing a stable sort by suit