Longest Palindromic Substring


Within a given string, find the longest palindromic substring of it. A palindrome is a word that is spelled the same backwards. In this case, it would be any part of the string that spells itself backwards.

Create a method called find_substring_palindrome that accepts a sentence.

"adracecarbye" # => "racecar"

"adracecarbyetattarrattat" # => "tattarrattat"
def find_substring_palindrome sentence end
< >