✅ C++ || Easy Solution || HashMap || 100% Faster
\nclass Solution {\npublic:\n  unordered_map<int,int>table;\n  int y, x;\n  \n  Solution(int m, int n) {\n    y = m, x = n;      \n  }\n    \n  vector<int> flip
```\nclass Solution {\npublic:\n  unordered_map<int,int>table;\n  int y, x;\n  \n  Solution(int m, int n) {\n    y = m, x = n;      \n  }\n    \n  vector<int> flip() {\n    int Y = rand() % y, X = rand() % x, id;\n    \n    while(table. count(id = (Y << 14) + X )){\n      if(++X == x) X = 0, Y++;\n      if(Y == y) Y = 0;\n    } \n    \n    table[id] = 1;\n    return {Y, X};    \n  }\n    \n  void reset() {\n    table.clear();   \n  }\n};\n```
['C']