Fill the array with integers from 1 to n. Then swap two elements with random indices.
Search it in Google "shuffle the numbers from 1 to n". Should be at least 4-5 well-known algorithms, but of different complexity.
alann answered on September 19th 19 at 12:32
it is necessary to make the function inside which to create a array and fill it with random numbers ( random function), and return the function will return a pointer to this array.
In the rules that says jobs are not the issue.