You are browsing the archive for 2011 November.

Longest Palindromic Substring Part II

November 20, 2011 in string

Given a string S, find the longest palindromic substring in S.

Note:
This is Part II of the article: Longest Palindromic Substring. Here, we describe an algorithm (Manacher’s algorithm) which finds the longest palindromic substring in linear time. Please read Part I for more background information.
Read the rest of this entry →

Longest Palindromic Substring Part I

November 20, 2011 in dynamic programming, string

Given a string S, find the longest palindromic substring in S.

Read the rest of this entry →