Longest Palindromic Substring: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{DISPLAYTITLE:Longest Palindromic Substring (Longest Palindromic Substring)}} == Description == Given a string of length $n$, find the palindromic substrings of maximal length. == Parameters == <pre>n: length of given string</pre> == Table of Algorithms == {| class="wikitable sortable" style="text-align:center;" width="100%" ! Name !! Year !! Time !! Space !! Approximation Factor !! Model !! Reference |- | Naive (Longest Palindromic Substring Longest Palin...") |
No edit summary |
||
Line 6: | Line 6: | ||
== Parameters == | == Parameters == | ||
n: length of given string | |||
== Table of Algorithms == | == Table of Algorithms == |
Revision as of 12:03, 15 February 2023
Description
Given a string of length $n$, find the palindromic substrings of maximal length.
Parameters
n: length of given string
Table of Algorithms
Name | Year | Time | Space | Approximation Factor | Model | Reference |
---|---|---|---|---|---|---|
Naive | 1940 | $O(n^{3})$ | $O({1})$ auxiliary | Exact | Deterministic | Space |
Dynamic Programming | 1953 | $O(n^{2})$ | $O(n^{2})$ | Exact | Deterministic | Space |
Manacher | 1975 | $O(n)$ | $O(n)$ auxiliary | Exact | Deterministic | Time |
Jeuring | 1994 | $O(n)$ | $O(n)$ auxiliary? | Exact | Deterministic | Time |
Gusfield | 1997 | $O(n)$ | $O(n)$ auxiliary | Exact | Deterministic | Time |
Time Complexity graph
Error creating thumbnail: Unable to save thumbnail to destination
Space Complexity graph
Error creating thumbnail: Unable to save thumbnail to destination
Pareto Decades graph
Error creating thumbnail: Unable to save thumbnail to destination