Leetcode 3447. Assign Elements to Groups with Constraints | Hello Interview