Skip to content

Commit 53b1b10

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a19259d commit 53b1b10

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dynamic_programming/longest_common_substring.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def longest_common_substring(text1: str, text2: str) -> str:
4444
raise ValueError("longest_common_substring() takes two strings for inputs")
4545

4646
if not text1 or not text2:
47-
return ''
47+
return ""
4848

4949
dp = [[0] * (len(text2) + 1) for _ in range(len(text1) + 1)]
5050
max_length, end_pos = 0, 0
@@ -57,7 +57,7 @@ def longest_common_substring(text1: str, text2: str) -> str:
5757
max_length = dp[i][j]
5858
end_pos = i
5959

60-
return text1[end_pos - max_length:end_pos]
60+
return text1[end_pos - max_length : end_pos]
6161

6262

6363
if __name__ == "__main__":

0 commit comments

Comments
 (0)