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 Palindromic Subsequence #387

Closed PrakharRathore123 closed 2 years ago

PrakharRathore123 commented 2 years ago

Enter your question -

Given a sequence, find the length of the longest palindromic subsequence in it.

Test Cases-

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

Enter link to the question(if question belongs to any online platform) -

-

Tags for the question(eg - Array, Basic, Stack, etc.) -

Recursion , Dynamic programming , Array ,String.

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly issue me this problem

SarthakKeshari commented 2 years ago

@PrakharRathore123, Kindly add your solution to "Dynamic Programming" folder. Deadline - 10/10/2021

PrakharRathore123 commented 2 years ago

@SarthakKeshari Kindly check the test cases.

SarthakKeshari commented 2 years ago

@PrakharRathore123, Perfect