I have an ArrayList with N items inside and I need to group them randomly into 2 sets of X items and the rest into another set. However, none of them can be repeated.
For example: my ArrayList has 20 items added and I want to split it into 2 groups of 7, and the remaining 6 into another set. However, the choice of these items to compose the sets has to be random and none of those 20 can be repeated in any of the sets.
I am aware of the Random class and I am using it, but the problem is being in the moment of comparing the new numbers generated with the previous ones, so that there is no repetition.