Super Simple Python Iterative Beat 98.4%


  • 0

    '''

    def subsets(self, nums):
        return_lis = [[]]
        
        for n in nums:
            temp_lis = return_lis[:]
            for r in temp_lis:
                return_lis.append(r+[n])
                
        return return_lis
    

    '''


Log in to reply
 

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