Skip to content

Commit 7019e32

Browse files
Formatting
1 parent 3d105c8 commit 7019e32

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/palindromic_substrings.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,22 +223,22 @@ def countSubstrings(self, s: str) -> int:
223223
while center <= original_center + original_radius:
224224
# Calculate the "mirrored" center for the current center.
225225
mirrored_center = original_center - (center - original_center)
226-
# Calculate the maximum possible radius of the palindrome centered
227-
# at `center`.
226+
# Calculate the maximum possible radius of the palindrome
227+
# centered at `center`.
228228
max_radius = original_center + original_radius - center
229229

230-
# Case 1: Palindrome of mirrored center lies entirely within the
231-
# original palindrome.
230+
# Case 1: Palindrome of mirrored center lies entirely within
231+
# the original palindrome.
232232
if palindrome_radii[mirrored_center] < max_radius:
233233
palindrome_radii[center] = palindrome_radii[mirrored_center]
234234
center += 1
235-
# Case 2: Palindrome of mirrored center extends beyond the boundary
236-
# of the original palindrome.
235+
# Case 2: Palindrome of mirrored center extends beyond the
236+
# boundary of the original palindrome.
237237
elif palindrome_radii[mirrored_center] > max_radius:
238238
palindrome_radii[center] = max_radius
239239
center += 1
240-
# Case 3: Palindrome of mirrored center extends exactly up to the
241-
# boundary of the original palindrome.
240+
# Case 3: Palindrome of mirrored center extends exactly up to
241+
# the boundary of the original palindrome.
242242
else:
243243
radius = max_radius
244244
break

0 commit comments

Comments
 (0)