Python timeout erro

  • 0

    Why i get timeout error, can someone help me please?

    class Solution(object):
    def firstUniqChar(self, s):
    for i in range(len(s)):
    c = s[i]
    if s.count(c)==1:
    return i

        return -1

Log in to reply

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