You are given an integer array nums and an integer k.
Determine whether it is possible to partition all elements of nums into groups such that each group contains exactly k distinct elements and every element from nums belongs to exactly one group.
Return true if such a partition is possible, or false otherwise.
Constraints:
nums.length
nums[i]
k nums.length
You are given an integer array nums and an integer k.
Determine whether it is possible to partition all elements of nums into groups such that each group contains exactly k distinct elements and every element from nums belongs to exactly one group.
Return true if such a partition is possible, or false otherwise.
Constraints:
nums.length
nums[i]
k nums.length