Problem 300 · Medium

Longest Increasing Subsequence

Patience sorting with binary search on a tails array to maintain O(n log n) time.

Open the interactive visualisation