The Sequence Riddle
The mastermind has left behind a series of encoded numbers. Intelligence suggests these numbers form a sequence with hidden meaning
Input is denoted by a list of integers nums
- Your task is to find the length of the longest subsequence that is strictly increasing.
- A subsequence is a sequence derived from the input array by deleting some or no elements without changing the order of the remaining elements.
For example, given nums = [10, 9, 2, 5, 3, 7, 101, 18], the LIS is [2, 3, 7, 101] with a length of 4.
- Additionally, when submitting the answers, if prompted, ensure your LIS is formatted as such "x, y, z"
Case 1
Input: nums = [3, 10, 2, 1, 20, 15, 5, 12, 16, 6, 21, 7]
Case 2
Input: The input is too long! Download it here (space seperated).
Submit Here