Data Structures & AlgorithmsModerateTCS NQT · CAT · MBA placement

In how many ways can you choose 4 distinct numbers from 1 to 6 and list them in increasing order? (Each choice gives exactly one increasing list.)

  1. A. 1296
  2. B. 15
  3. C. 360
  4. D. 20

Correct answer: B. 15

Choosing a set fixes the increasing order uniquely, so the count is C(6, 4) = 15. Ordered selections, 6 × 5 × 4 × 3 = 360, count every ordering of the same set and overcount.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic