Question: Given a string s, write pseudo-code to find the longest palindromic substring in s in linear time. Do not use Manacher's algorithm. For example

Given a string s, write pseudo-code to find the longest palindromic substring in s in linear time. Do not use Manacher's algorithm. For example if input is "aacecaaa" output is "aacecaa".
Step by Step Solution
3.51 Rating (164 Votes )
There are 3 Steps involved in it
Pseudocode Function expandAroundCenters left right while left 0 and right lengths and sleft sright l... View full answer
Get step-by-step solutions from verified subject matter experts
