my python solution without 2D matrix
It is not so fast but works well.\n```\nclass Solution:\n\n    def init(self, n_rows: int, n_cols: int):\n        self.a=n_rows-1\n        self.b=n_cols-1\n    
It is not so fast but works well.\n```\nclass Solution:\n\n    def __init__(self, n_rows: int, n_cols: int):\n        self.a=n_rows-1\n        self.b=n_cols-1\n        \n        self.w=[]\n        #print(1)\n    def flip(self) -> List[int]:\n        g=1\n          \n        while g:\n            \n            t1=random.randint(0, self.a)\n            t2=random.randint(0, self.b)\n            if [t1,t2] in self.w:\n                continue\n            else:\n                self.w.append([t1,t2])\n                g=0\n        return [t1,t2]\n             \n        \n\n    def reset(self) -> None:\n        self.w=[]\n        #print(3)\n
[]