Placement AptitudeHardAmazon OA · CAT

In how many ways can 12 be written as an ordered sum of 1's and 2's (for example 2 + 1 + 1 + … counts differently from 1 + 2 + 1 + …)?

  1. A. 144
  2. B. 377
  3. C. 78
  4. D. 233

Correct answer: D. 233

If w(n) is the count, the first part is 1 or 2, so w(n) = w(n − 1) + w(n − 2) with w(1) = 1, w(2) = 2. This gives 3, 5, 8, …, w(12) = 233.

More Permutations, Combinations and Probability (Placement) questions

Exams that ask this topic