They should have mentioned array contains distinct numbers

# How can we assume input doesn't rake duplicates?

Its mentioned in the note:

**NOTE**

- No two entries in the permutation sequence should be the same.
**For the purpose of this problem, assume that all the numbers in the collection are unique.**

set<vector> s;

for(int i=0; i<result.size(); i++){

s.insert(result[i]);

}

result.clear();

```
for(auto it=s.begin(); it!=s.end(); it++){
result.push_back(*it);
}
```

You can do this to get rid of the problem! Very simple and naive approach.