Question:
input : n
output: A random permutation of [0 .. n-1]
ie:
input: 5
output: 0 3 2 4 1
// Type your C++ code and click the "Run Code" button!
// Your code output will be shown on the left.
// Click on the "Show input" button to enter input data to be read (from stdin).
#include <iostream>
using namespace std;
typedef vector<int> List;
// print series
void printList(List arr) {
List::iterator it = arr.begin();
whi