How to make it pass the test ?


  • 0
    L
    def singleNumber(self, A):
        if len(A) == 1 : return A
        else :
            while(1) :
                try :
                    B = A.pop()
                    A.index(B)
                    A.pop()
                except :
                    return B

Log in to reply
 

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