Hand of Straights
Alice has some number of cards and she wants to rearrange the cards into groups so that each group is of size groupSize, and consists of groupSize consecutive cards. Given an integer array hand where hand[i] is the value written on the ith card and an integer groupSize, return true if she can rearrange the cards, or false otherwise.
Hand of Straights

Alice has some number of cards and she wants to rearrange the cards into groups so that each group is of size groupSize, and consists of groupSize consecutive cards. Given an integer array hand where hand[i] is the value written on the ith card and an integer groupSize, return true if she can rearrange the cards, or false otherwise.

Example 1:
Input: {"hand":[1,2,3,6,2,3,4,7,8],"groupSize":3}
Output: true
Input
arr ={"hand":[1,2,3,6,2,3,4,7,8],"groupSize":3}

Start. Count cards.

Available Cards (Count)

1

x1

2

x2

3

x2

4

x1

6

x1

7

x1

8

x1
Forming Group (Size 3)

Empty

Variables
No variables to display
DepthFunction Call
Stack empty
0/32