pyassistant

Longest Increasing Subsequence

Given a list of integers, write a function to return the longest increasing subsequence present in the list. The subsequence does not need to be contiguous, but the elements must be in non-decreasing order.

Example:

Input:
[10, 22, 9, 33, 21, 50, 41, 60, 80]
Output:
[10, 22, 33, 50, 60, 80]

Make sure you return your solution, don't print!

AI

Bot

Trying to solve my challenge? Ask if you must, or press the purple button so I can analyze your code.