Welcome to class random.py101 & set.py101
Question should be tagged as easy.\n\nclass Solution:\n\n    def __init__(self, n_rows, n_cols):\n        self.rows, self.cols, self.used = n_rows, n_cols, set(
* Question should be tagged as easy.\n```\nclass Solution:\n\n    def __init__(self, n_rows, n_cols):\n        self.rows, self.cols, self.used = n_rows, n_cols, set()\n        \n    def flip(self):\n        while True:\n            r, c = random.randint(1, self.rows), random.randint(1, self.cols)\n            if (r, c) not in self.used:\n                self.used.add((r, c))\n                return [r - 1, c - 1]\n            \n    def reset(self):\n        self.used = set()\n```
[]