Given an array of numbers, find the longest subsequence that is strictly increasing. Unlike sorting, elements must keep their original relative order. A cornerstone DP problem used in patience sorting, version history analysis, and RNA structure prediction.
A subsequence is a selection of elements that preserves original order but can skip elements. For [3, 10, 2, 1, 20], the LIS is [3, 10, 20] (length 3) — not [3, 10, 2, 20] because 2 < 10 breaks the increasing order.