Skip to content

Commit c276c58

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

strings/wildcard_pattern_matching_fft.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def preprocess_text_and_pattern(text: str, pattern: str) -> tuple[list[int], lis
2626

2727
return text_int, pattern_int
2828

29+
2930
def fft_convolution(a: list[int], b: list[int]) -> np.ndarray:
3031
"""Performs convolution using the Fast Fourier Transform (FFT).
3132
@@ -76,7 +77,7 @@ def compute_a_fft(text_int: list[int], pattern_int: list[int]) -> np.ndarray:
7677
sum3 = fft_convolution(p1[::-1], t3)
7778

7879
# Calculate a[i] using the convolution results
79-
a = sum1[:n - m + 1] - 2 * sum2[:n - m + 1] + sum3[:n - m + 1]
80+
a = sum1[: n - m + 1] - 2 * sum2[: n - m + 1] + sum3[: n - m + 1]
8081
# Calculate A[i] using the convolution results
8182
A = sum1[: n - m + 1] - 2 * sum2[: n - m + 1] + sum3[: n - m + 1]
8283

0 commit comments

Comments
 (0)