Info
Given a string S
, the task is to find the longest substring which is a palindrome. If there are multiple answers, then return the first appearing substring
Examples:
- Input:
forgeeksskeegfor
- Output:
geeksskeeg
April 2, 2025About 6 min
Given a string S
, the task is to find the longest substring which is a palindrome. If there are multiple answers, then return the first appearing substring
Examples:
forgeeksskeegfor
geeksskeeg