to make it clearer I have an array of player ids and I want to divide into X number of groups equally and randomly, but when the number is odd the group 1 need to be the subarray with the small number of parts: like this example:
- Player ids: [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
- Number of groups: 3
- expected result: [14,12,2,1], [3,4,8,13,11], [5,6,7,9,10]
I cases when the number is even is easier but i don't know how to achieve this case. I need some help to know how to.