A DP and index self-check tests state transitions, subsequence order, item reuse and prefix-range arithmetic.
Review the contracts
Review common subsequence order, strict increasing subsequences, zero-one item use, prefix sums before answering.
Choose and explain an answer
Name what each cached state means and which prior states the update may read. Check whether equal values, repeated items or an empty interval change the result.
Select an answer for every question, then check the result and read each explanation. Progress remains in this browser; this is a self-check, not a judged program submission or a credential.
Common Mistakes
The LIS tails array does not necessarily reconstruct a chosen subsequence. Updating capacities in the wrong direction can reuse a zero-one item.
