Available question text
Given two equal-length arrays representing the top and bottom numbers of dominoes, find the minimum number of single-domino rotations (swapping top and bottom) needed so that all entries in the top row or all in the bottom row are the same, or return -1 if impossible. The solution hinges on checking candidate target values that must appear on every domino (on at least one side) and counting required swaps.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1007. Minimum Domino Rotations For Equal Row
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source