Why time exceed


  • 0
    L

    Hi, my submission is:

    if len(s)==0:
    return True
    k=''
    for i in list(s):
    if i.isalnum():
    k+=i
    return k[::-1]==k

    But I got time exceed I want to know why. Could anybody help me? Thanks a lot~~


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.