This is a verified interview question from Future-first. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Palindromic Substring" covers key patterns like Strings.
"### Problem Have the function PalindromicSubstring(str) take the str parameter being passed and find the longest palindromic substring, which means the longest substring which is read the same forwards as it is backwards. For example: if str is 'abracecar' then your program should return the string racecar because it is the longest palindrome within the input string. The input will only contain lowercase alphabetic characters. The longest palindromic substring will always be unique, but if there is none that is longer than 2 characters, return the string none. ### Input A string containing lowercase alphabetic characters. ### Output The longest palindromic substring."
Join thousands of developers practicing for Future-first.