pyassistant

Longest Increasing Subsequence

Given a list of integers, write a function to find the longest increasing subsequence (LIS) within the list. The LIS is a subsequence of the given list in which the elements are sorted in strictly increasing 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.