easy approach using Hash Table
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    int m, n;
    map<pair<int,int>,int>map;
    Solution(int m, int n) {
        this->m = m;
        this->n = n;
    }
    
    vector<int> flip() {
        int x = rand()%m;
        int y = rand()%n;

        while(map[{x,y}] >0){
            x = rand()%m;
            y = rand()%n;
        }
        map[{x,y}]++;
        return {x,y};
    }
    
    void reset() {
        map.clear();
        
    }
};

/**
 * Your Solution object will be instantiated and called as such:
 * Solution* obj = new Solution(m, n);
 * vector<int> param_1 = obj->flip();
 * obj->reset();
 */
```
['Hash Table', 'C++']