Fast and short python 97% / 100%
\n\nclass Solution:\n    def minDominoRotations(self, A: List[int], B: List[int]) -> int:\n        res = -1\n        lg = len(A)\n        if lg:\n            fo
```\n\nclass Solution:\n    def minDominoRotations(self, A: List[int], B: List[int]) -> int:\n        res = -1\n        lg = len(A)\n        if lg:\n            for x in (A[0],B[0]):\n                if all(A[i] == x or B[i] == x for i in range(lg)):\n                    res = lg-max(A.count(x),B.count(x))\n        return res\n```\n\nTried to do it in 2 passes counting as they go but was actually slower than 4 passes including seperate counting
[]