Data-Structures-Algorithms
Data-Structures-Algorithms copied to clipboard
LaggestIncreasingSubsequence.cpp
You are Given an Array You have to find the length of largest increasing subsequence for example Input : arr[] = {3, 10, 2, 1, 20} Output : Length of LIS = 3 The longest increasing subsequence is 3, 10, 20
Input : arr[] = {3, 2} Output : Length of LIS = 1 The longest increasing subsequences are {3} and {2}
Input : arr[] = {50, 3, 10, 7, 40, 80} Output : Length of LIS = 4 The longest increasing subsequence is {3, 7, 40, 80}
Submission Checklist
- [ ] Your pull request targets the
masterbranch of the repository. - [ ] You have only one commit (if not, squash them into one commit).
- [ ] You have read the Contributing guidelines and your changes follow them.
Type of Change
- [ ] Bug fix
- [ ] New implementation
PR Description
Issue #[Add issue number here.]