← Questions

Longest palindromic subsequence

0
MicrosoftCodingLast asked Dec 2025

Return the length of the longest subsequence of a string that reads the same forwards and backwards. Give the interval dynamic programming and its O(n^2) time.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding