Time out when executing with input [0]

  • 0
        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
        return tbl[0]

    any suggestions?

  • 0

    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

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

  • 0

    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.