dsa11 min read
Longest Increasing Subsequence — Patience Sorting with Binary Search [LC 300, Google, Amazon]
Find the length of the longest strictly increasing subsequence in O(n log n) using patience sorting — a binary search on a maintained tails array that is simpler and faster than classic DP.
Read →