Tag: longestpalindromicsubstring
-
Data Structures & Algorithms in Java – Strings – Longest Palindromic Substring
Problem: Given a string , find the longest palindromic substring in that string. For example , for the input “babad” the longest palindromic substring is “bab” or “aba”. For the input “cbbd” the longest palindromic substring is “bb” Assumptions: The string has at least one character and at the most 1000 characters The string consists…