Given a string S, find the longest palindromic substring in S. This interesting problem has been featured in the famous Greplin programming challenge , and is asked quite often in the interviews. Why? Because this problem can be attacked in so many ways. There are five different solutions that I am aware of. Are you up to the challenge? Head over to Online Judge to solve it now! (you may submit either C++ or Java solution) Hint: First, make sure you understand what a palindrome means. A palindrome is a string which reads the same in both directions. For example, “aba” is a palindome,
Read full article from Longest Palindromic Substring Part I | LeetCode
No comments:
Post a Comment