Data Structures & AlgorithmsModerateTCS NQT · Accenture

Problem: Start with 7, multiply it by 3, then repeatedly replace the number by the sum of its decimal digits until a single digit remains. What digit results?

  1. A. 4
  2. B. 2
  3. C. 3
  4. D. 5

Correct answer: C. 3

Multiply once, then reduce by digit sums until a single digit remains. Repeatedly multiplying by 3 without the digit-sum step gives a huge number, not a digit.

More Coding Interview Problems questions

Exams that ask this topic