Skip to content

Commit

Permalink
Update is_string_palindromic_punctuation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaltz committed Nov 17, 2022
1 parent c1f9618 commit 5671d6a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions epi_judge_python/is_string_palindromic_punctuation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ def is_palindrome(s: str) -> bool:
"""
#6.5
Similar to Leetcode # 125. Valid Palindrome
Time complexity = O(n), where n is the length of the string.
Space complexity = O(1)
Test PASSED (305/305) [ 55 ms]
Average running time: 184 us
Test PASSED (305/305) [ 47 ms]
Average running time: 156 us
Median running time: 1 us
"""
# left moves forward, and right moves backward.
Expand Down

0 comments on commit 5671d6a

Please sign in to comment.