W
William Stacey [MVP]
Have an ArrayList in a class with 1 or more elements (no fixed upper bound)
Want a method on the class to return a new ArrayList with the permuted order
of the arraylist so that each call returns different order until it starts
again.
Such that a 3 element arraylist (for example) of elements A,B,C would
return: ABC/BCA/CAB/ACB/BAC/CBA
Any ideas? TIA
Want a method on the class to return a new ArrayList with the permuted order
of the arraylist so that each call returns different order until it starts
again.
Such that a 3 element arraylist (for example) of elements A,B,C would
return: ABC/BCA/CAB/ACB/BAC/CBA
Any ideas? TIA