Skip to content

Commit 4e5ef45

Browse files
committed
Time: 482 ms (30.32%), Space: 11.1 MB (60.87%) - LeetHub
1 parent 6023227 commit 4e5ef45

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

5-longest-palindromic-substring/5-longest-palindromic-substring.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ class Solution {
55
int dp[n][n];// dp[i][j] = 1 if str[i][j] is a palindrome
66
// = 0, otherwise
77

8-
for(int i = 0; i < n; i++) {
9-
for(int j = 0; j < n; j++) {
10-
dp[i][j] = 0;
11-
}
12-
}
13-
148
// 1 len
159
for(int i = 0; i < n; i++) {
1610
dp[i][i] = 1;

0 commit comments

Comments
 (0)