Minimum Domino Removals

Problem Overview

  • Given array A of length 2N representing N dominoes (A[2K], A[2*K+1]), find the minimum number of tiles to remove so the remaining tiles form a correct domino sequence.
  • Adjacent tiles must have matching dots on touching sides; tiles cannot be reordered or rotated; dots range 1–6.
  • Input: integer array; Output: minimal removal count.
  • Real-world domain: validating and pruning a domino chain.
  • A Microsoft interviews coding interview question and classic interview problem.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: