Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbd4270f

Browse files
committed
Improve memory allocation
1 parent2d6f0ec commitbd4270f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎strings/is_substring_palindrome.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def preprocess(s):
1111
globaltext
1212
globaldp
1313
text=s
14-
dp= [[Falseforiinrange(MAX_LEN)]foriinrange(MAX_LEN)]
1514
n=len(s)
15+
dp= [[Falseforiinrange(n)]foriinrange(n)]
1616

1717
foriinrange(n):
1818
dp[i][i]=True

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp