Remix.run Logo
dmehrle 13 hours ago

Subsequences need not be contiguous. In your example, taking every other number gives the desired monotone subsequence.