Cards of the Same Suit
You are given an array of strings that represents a hand of playing cards as an argument. Each string is formatted as "
A flush is formed when you have five cards of the same suit.
Requirements
- Must return either true or false
Example #1
solve(["Ace of Spades", "Three of Spades", "Four of Spades", "Five of Spades", "King of Spades"])
> true
Example #2
solve(["Ace of Diamonds", "Three of Hearts", "Four of Spades", "Five of Spades", "King of Spades"])
> false