• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
August 08, 2023 |1.4K Views
Longest Increasing Subsequence
Description
Discussion

In this video, we are given an array of integers. We have to find the length of the longest (strictly) increasing subsequence from the given array.

Example 1:

Input:
N = 16
A = {0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15}

Output: 
6

Explanation:
There is more than one LIS in this array. One such Longest increasing subsequence is {0,2,6,9,13,15}.

Try it out before watching the implementation of the problem in the video. We recommend watching the video, even if you can solve the problem. You may discover something new. All the best!!!

Do check out:-

Article: https://www.geeksforgeeks.org/longest-increasing-subsequence-dp-3/
Problem: https://practice.geeksforgeeks.org/problems/longest-increasing-subsequence-1587115620/1
SDE Sheet: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/

Read More