Data Structures & AlgorithmsModerateICPC regional · DP warm-up

Problem: How many ways are there to tile a 2 x 10 board completely with 2 x 1 dominoes (placed horizontally or vertically)?

  1. A. 55
  2. B. 144
  3. C. 34
  4. D. 89

Correct answer: D. 89

Let t(n) be the tilings of 2 x n; then t(n) = t(n-1) + t(n-2) with t(1) = 1 and t(2) = 2, so t(n) = F(n+1) and t(10) = F(11) = 89.

More Coding Interview Problems questions

Exams that ask this topic