Closed PrakharRathore123 closed 2 years ago
@SarthakKeshari Kindly acknowledge this pull request.
@SarthakKeshari Kindly check for this issue only one file in dynamic programming folder that is Longestpalindromicsequuence.cpp
@SarthakKeshari Kindly check for this issue only one file in dynamic programming folder that is Longestpalindromicsequuence.cpp
@PrakharRathore123, Still there are two files. Kindly look into it.
Issue Id you have worked upon -
387
Briefly explain your program logic -
1)If string has only one value then return 1 2)If string has only one value then return 2 3)If string has only first and last character are same then call the recursive function 4)If string has only first and last character are not same then call the recursive function with max because we have to find the longest.
Test case-
Test 1 ) For the input of string="PRAKHAR" Longest Palindromic Subsequence possible is "RAHAR" so max length is 5
Test 2 ) For the input of string="SARTHAK" Longest Palindromic Subsequence possible is "AHA" so max length is 3
Screenshots(Attach 2 screenshots of your own input and output) -
Attach here
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 -
[x] I have mentioned the question as comment in my solution file.
[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have commented my code.
[x] My code gives the correct output.
[x] I confirm that I have not copied the code from anywhere. In case its found that I have copied even after successful merge then I can be banned from the repository and hacktoberfest.
[x] I affirm that I strictly follow contributing guidelines and code of conduct.