Skip to content

Manacher's algorithm #4582

@SanketPatil7467

Description

@SanketPatil7467

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions