GATE Computer ScienceHardGATE CS · ISRO

What is the length of the longest strictly increasing subsequence of [10, 22, 9, 33, 21, 50, 41, 60, 80, 3, 5, 70, 75, 90]?

  1. A. 7
  2. B. 9
  3. C. 8
  4. D. 10

Correct answer: C. 8

The O(n²) DP (or patience sorting) gives length 8.

More Algorithms questions

Exams that ask this topic