simple C++ solution

  • -1

    class Solution {

    vector<int> nums;
    Solution(vector<int> nums) {
        this->nums = nums;
    /** Resets the array to its original configuration and return it. */
    vector<int> reset() {
        return nums;
    /** Returns a random shuffling of the array. */
    vector<int> shuffle() {
        vector<int> res(nums);
        return res;


Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.