In a row of dominoes, each domino has two halves, represented by two integer arrays tops and bottoms, where tops[i] and bottoms[i] denote the top and bottom values of the
A rotation consists of swapping the top and bottom values of a domino tile at index i, swapping tops[i] and bottoms[i].
Return the minimum number of rotations required to make all the values in tops equal or all the values in bottoms equal. If it is impossible to make all values in either row equal, return
Constraints:
tops.length
bottoms.length tops.length
tops[i], bottoms[i]
In a row of dominoes, each domino has two halves, represented by two integer arrays tops and bottoms, where tops[i] and bottoms[i] denote the top and bottom values of the
A rotation consists of swapping the top and bottom values of a domino tile at index i, swapping tops[i] and bottoms[i].
Return the minimum number of rotations required to make all the values in tops equal or all the values in bottoms equal. If it is impossible to make all values in either row equal, return
Constraints:
tops.length
bottoms.length tops.length
tops[i], bottoms[i]