How To Remove 3 Or More Cards That Are In Sequence From An Array Of Cards

How to remove 3 or more cards that are in sequence from an array of cards? The array is not sorted. For example: if the 7 of spades, 6 of clubs and 8 of hearts is present, the player must remove it. However if only 2 of them are present, the player cannot remove the 2 cards. There must be at least 3 cards in sequence.

Posted in Uncategorized