DEV Community

Discussion on: The Longest Palindromic Substring: Solving the Problem Using Constant Space

Collapse
 
hanu7674 profile image
HANUMANTHA REDDY LINGALA

Given a strings and an integer D. The task is to determine the length of the longest palindromic string P that can be prepared using D distinct characters of string S such that the frequency of any character C in string P is at most the frequency of the same character in the string S.