Problems > Longest Non-Decreasing Subsequence > Editorial

Longest Non-Decreasing Subsequence — Solution & Editorial

Back to the Problem

Patience sorting with bisect_right so equal elements extend the run.

Complexity: O(N log N)