Why wrong Can u help me?


  • 0
    H
    if len(s) != len(t): return False
    for i in range(0,len(s) - 1):
        if s[i] != s[i+1] and t[i] == t[i+1]: return False
        if s[i] == s[i+1] and t[i] != t[i+1]: return False
     return True

Log in to reply
 

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