Data Structures & AlgorithmsModerateCAT · TCS NQT

Problem: How many 3-digit numbers (100–999) have digits that form a strictly increasing sequence when read left to right?

  1. A. 84
  2. B. 120
  3. C. 165
  4. D. 720

Correct answer: A. 84

The leading digit is the smallest, so 0 is never usable: C(9,3) = 84. C(10,3) = 120 wrongly allows 0, non-decreasing triples give 165, and 10 · 9 · 8 = 720 counts ordered choices.

More Coding Interview Problems questions

Exams that ask this topic