I have unknown number of items, each having ID (consecutive integer numbers), ie.
I want to split above items into as equal size N groups as possible, using algorithm based on the ID.
Important! The input data is only:
- X (group size)
- ID of current item
The algorithm is simple when the group size is 2:
if ID mod 2 == 0 then group 1 else group 2
But what if group size is ie. 7?