[Python3] Runtime: 1064 ms, faster than 99.01% | Memory: 14.9 MB, less than 98.42%
\nclass Solution:\n    def minDominoRotations(self, tops: List[int], bottoms: List[int]) -> int:\n        \n        for x in [tops[0], bottoms[0]]:\n           
```\nclass Solution:\n    def minDominoRotations(self, tops: List[int], bottoms: List[int]) -> int:\n        \n        for x in [tops[0], bottoms[0]]:\n            if all(x in domino for domino in zip(tops, bottoms)):\n                return len(tops) - max(tops.count(x), bottoms.count(x))\n        \n        return -1\n```\n
['Python']