Skip to content

Implementation of Manacher's algorithm to find Longest Palindromic Substring in O(N) #2647

@mdrpanwar

Description

@mdrpanwar

Is your feature request related to a problem? Please describe.
The existing implementation of Longest Palindromic Substring algorithm at /Strings/LongestPalindromicSubstring is O(N^3). Faster algorithms for this task are known to exist.

Describe the solution you'd like
I would like to add Manacher's algorithm which finds Longest Palindromic Substring in O(N).

Additional context
Here is the link to the Wikipedia page of Longest palindromic substring which mentions Manacher's algorithm.

I would like to work on this implementation as part of Hacktoberfest 2021.

@siriak Could you please assign this issue to me? Also, should I add this to a new file?

Thanks.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions