What is the time complexity of this palindrome algorithm?

前端 未结 0 1506
面向向阳花
面向向阳花 2021-01-18 05:21
def isPalindrome(s):
    if not s:
        return True
    st = "".join(char for char in s if char.alphanum()).lower()
    return st == st[::-1]

相关标签:
回答
  • 消灭零回复
提交回复
热议问题