Time out when executing with input [0]


  • 0
    W
        def canJump(self, A):
        if A is None or len(A) == 1: 
            return True
        tbl = [False for i in range(len(A))]
        tbl[-1] = True
        for i in range(len(A)-2, -1, -1):
            v = A[i]
            if v == 0: continue
            for j in range(i + 1, i + v + 1):
                if j >= len(tbl): break
                if tbl[j]:
                    tbl[i] = True
                    break
        return tbl[0]
    

    any suggestions?


  • 0
    C

    I think there's something wrong with server. I've met this problem several times (solving other problems) since yesterday. No matter which test times out, the web page always shows "time out when executing with input [0]" or "time out when executing with input {}"


  • 0
    W

    Oh really? then let's wait for a while.. thanks


  • 0
    C

    But you DO timed out. It's just not for test case "input [0]".


Log in to reply
 

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