You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4e44a92
Browse filesBrowse the repository at this point in the historyBrowse files
# Copyright (c) 2020 Vladimir Shurygin. All rights reserved.
5
+
#
6
+
'''
7
+
Longest Palindromic Substring
8
+
9
+
Solution:
10
+
The time complexity can be reduced by storing results of subproblems.
11
+
We maintain a boolean table[n][n] that is filled in bottom up manner.
12
+
The value of table[i][j] is true, if the substring is palindrome, otherwise false. To calculate table[i][j], we first check the value of table[i+1][j-1], if the value is true and str[i] is same as str[j], then we make table[i][j] true. Otherwise, the value of table[i][j] is made false.
0 commit comments