← ALL NOTES
Array

1128. Number of Equivalent Domino Pairs

Count equivalent domino pairs — dominoes [a,b] and [c,d] are equivalent if one is a rotation of the other ({a,b} equals {c,d} as an unordered pair). The two moves that make this O(n): canonicalise…

Loading…