SarthakKeshari / CPP-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
47 stars 132 forks source link

Longest Increasing Subsequence #316

Closed PrakharRathore123 closed 2 years ago

PrakharRathore123 commented 2 years ago

Issue Id you have worked upon -

304

Briefly explain your program logic -

1) Function to calculate the LIS 2)If value is already calculated then return that 3)Else take it as 1 4)If an value is less then last Element the increase DP 5)Call Recursive function 6)Return DP value

Screenshots(Attach 2 screenshots of your own input and output) -

Attach here LISC LISD


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your code for merging -

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly acknowledge this.