Using next Permutation STL:

```
class Solution {
public:
vector<int> origin;
vector<int> back; //back to original
Solution(vector<int> nums) {
back=nums;
origin=nums;
}
/** Resets the array to its original configuration and return it. */
vector<int> reset() {
return back;
}
/** Returns a random shuffling of the array. */
vector<int> shuffle() {
next_permutation(origin.begin(),origin.end());
return origin;
}
};
```