C++ Simple, Short and Clean Solution
\nclass Solution {\npublic:\n    Solution(int n_rows, int n_cols) {\n        rows = n_rows, cols = n_cols;\n    }\n    \n    vector<int> flip() {\n        int r
```\nclass Solution {\npublic:\n    Solution(int n_rows, int n_cols) {\n        rows = n_rows, cols = n_cols;\n    }\n    \n    vector<int> flip() {\n        int random = rand() % (rows*cols);\n        \n        while (flipped.count(random)) {\n            random++;\n            random %= (rows*cols);\n        }\n        \n        flipped.insert(random);\n        return {random / cols, random % cols};\n    }\n    \n    void reset() {\n        flipped = {};\n    }\n    \nprivate:\n    int rows, cols;\n    unordered_set<int> flipped;\n};\n```\n**Like it? please upvote!**
['C']