Skip to content

Longest Palindromic Subsequence (Dynamic Programming) #239

@Adityakumar37

Description

@Adityakumar37

I would like to add this question as well, as it builds strong conceptual understanding and is challenging, making it valuable for improving problem-solving skills.

📝 Problem Statement

Given a string s, find the length of the longest subsequence of s that is also a palindrome.
A subsequence is a sequence derived from another sequence by deleting some or no characters, without changing the order of the remaining characters.

Example::

Example 1:
Input: s = "bbbab"
Output: 4
Explanation: The longest palindromic subsequence is "bbbb".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions