Palindromic Substrings
ARRAY
STRING

Problem

Given a string s, find all the non-single letter substrings that are palindromes. A palindrome is a string that reads the same forward and backward.

Examples:

findPalindromicSubstrings("madam") // returns ["madam", "ada"] findPalindromicSubstrings("level") // returns ["level", "eve"] findPalindromicSubstrings("abbaaba") // returns ["abbaaba", "bbaab", "baab", "aa", "abba", "bb", "aba", "baab", "aa", "aba"]
Loading...