Data Structures & AlgorithmsHardCodeforces Div2 C · GATE CS

How many non-empty subsequences of [2, 3, 5, 7] have a product strictly less than 50?

  1. A. 15
  2. B. 10
  3. C. 4
  4. D. 12

Correct answer: D. 12

Enumerate all 15 non-empty subsets: 4 singletons, all 6 pairs (largest 35) and the triples 30 and 42 are below 50, while 70, 105 and 210 are not: 12. Forgetting the triples gives 10, 4 counts singletons and 15 every subset.

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

Exams that ask this topic