Write a method, shuffle(A), that rearranges the elements of array A so that every
possible ordering is equally likely. You may rely on the nextInt(n) method of
the java.util.Random class, which returns a random number between 0 and n−1
inclusive.
Rearrange elements in an array question
this question will need you to study about Fisher–Yates shuffle algorithm. pls don’t post doubts of other platform’s course here
It is from a book and not from any other online course.
It is from Goodrich DSA IN JAVA page 146 Question C-3.22. 6th Edition.
its just Fisher–Yates shuffle algorithm. you ll have to study this