LeetCode
Number of Equivalent Domino Pairs
Click
here
for an explanation.