ProgrammingHard

The number of ways to tile a 2 x 5 board exactly with 2 x 1 dominoes, counting orientations, is what?

  1. A. 5
  2. B. 6
  3. C. 13
  4. D. 8

Correct answer: D. 8

f(n) = f(n-1) + f(n-2) with f(0) = f(1) = 1, so the values run 1, 1, 2, 3, 5, 8 and f(5) = 8.

More C Programming questions

Exams that ask this topic