Data Structures & AlgorithmsVery hardGATE CS

A 2 × 11 board is tiled completely using 1 × 2 dominoes (placed either way) and 2 × 2 squares. How many different tilings are there?

  1. A. 1366
  2. B. 1194
  3. C. 1365
  4. D. 1024

Correct answer: C. 1365

Considering the last column: a vertical domino leaves a 2 × 10 board and either two horizontal dominoes or a 2 × 2 square leave a 2 × 9 board, so T(n)=T(n−1)+2T(n−2), T(0)=T(1)=1 (Jacobsthal numbers). This gives T(11)=1365.

More Coding Interview Problems questions

Exams that ask this topic