Given an array dominoes where each domino is represented as a pair of integers dominoes[i] = [a, b].
Two dominoes dominoes[i] = [a, b] and dominoes[j] = [c, d] are considered equivalent if and only if either (a == c and b == d) or (a == d and b == c), meaning one domino can be rotated to match the other.
Return the total number of pairs dominoes.length, where dominoes[i] is equivalent to dominoes[j].
Constraints:
dominoes.length
dominoes[i].length
dominoes[i][j]
Given an array dominoes where each domino is represented as a pair of integers dominoes[i] = [a, b].
Two dominoes dominoes[i] = [a, b] and dominoes[j] = [c, d] are considered equivalent if and only if either (a == c and b == d) or (a == d and b == c), meaning one domino can be rotated to match the other.
Return the total number of pairs dominoes.length, where dominoes[i] is equivalent to dominoes[j].
Constraints:
dominoes.length
dominoes[i].length
dominoes[i][j]