Medium
Given an array hand of card values and a group size k (LeetCode: groupSize), return true if the cards can be rearranged into groups of k consecutive cards.
Input: hand = [1,2,3,6,2,3,4,7,8], k = 3 Output: true
Input: hand = [1,2,3,4,5], k = 4 Output: false