How does the On log n longest increasing subsequence method work? | Dynamic Programming question · AnyPrep