Search⌘ K
AI Features

Solution: Longest Palindromic Subsequence

C# solution for the Longest Palindromic Subsequence problem using the Dynamic Programming pattern.

Statement

Given a string s, return the length of the longest subsequence of s that is a palindrome.

A subsequence is formed by deleting zero or more characters from s without changing the relative order of the remaining characters.

Constraints:

  • 11 \leq s.length ...