Prefix sums handle range queries efficiently. But what about subsequence problems where elements don't have to be contiguous? The next section covers Longest Increasing Subsequence. You'll learn the "ending at " pattern, which is different from the "prefix up to " pattern you just learned.
LIS (Longest Increasing Subsequence) introduces a key DP (Dynamic Programming) idea: the state isn't just position, but the value at that position matters for the transition. Make sure you're comfortable with prefix sums. The 2D version especially will return in grid DP problems.