Data Structures & AlgorithmsModerateTCS NQT · Infosys

Problem: Starting with 1, the operations are: multiply by 2, then add 3, applied three times in a row (x → 2x + 3). What is the result after the three operations?

  1. A. 13
  2. B. 50
  3. C. 61
  4. D. 29

Correct answer: D. 29

1 → 5 → 13 → 29 under x → 2x + 3. Two applications give 13, adding first and then doubling gives 8, 22, 50, and a fourth application gives 61.

More Coding Interview Problems questions

Exams that ask this topic