Longest Increasing Subsequence
One problem, two solutions — a clean O(n²) DP and a clever O(n log n) upgrade using binary search where you would least expect it.
9 min readUpdated 2026-09-03dynamic-programminglisbinary-search
One problem, two solutions — a clean O(n²) DP and a clever O(n log n) upgrade using binary search where you would least expect it.