-
Notifications
You must be signed in to change notification settings - Fork 20.8k
Closed
Labels
Description
What would you like to Propose?
Manacher's algorithm to find maximum length's palindromic substring.
- Manacher's algorithm is used to find the longest palindromic substring in a given string with a time complexity of O(n), where n is the length of the input string.
- Manacher's algorithm is an efficient method for solving this problem in linear time complexity, making it faster than other brute-force approaches.
- It uses a combination of dynamic programming and clever techniques to identify palindromes within the string and extend them efficiently.
- for eg : Input string = "wdfghjklsracecarswekfjdsnitins"
In this example there are two substrings 'sracecars' and 'snitins', so this algorithm returns 'sracecars' as a max length palindromic substring
Issue details
Manacher's algorithm to find maximum length's palindromic substring.
- Manacher's algorithm is used to find the longest palindromic substring in a given string with a time complexity of O(n), where n is the length of the input string.
- It uses a combination of dynamic programming and clever techniques to identify palindromes within the string and extend them efficiently.
- for eg : Input string = "wdfghjklsracecarswekfjdsnitins"
In this example there are two substrings 'sracecars' and 'snitins', so this algorithm returns 'sracecars' as a max length palindromic substring
Additional Information
No response