My solution in python is here


#1

class Solution:
# @param A : list of integers
# @return a list of list of integers
def subsets(self, A):
subset=[]
index = 0
A.sort();
self.subsetsUtil(A, subset,[], index)
return subset

def subsetsUtil(self,A, subset,curr,index):
    subset.append(list(curr))
    for i in range(index, len(A)):  
        curr.append(A[i])
        self.subsetsUtil(A, subset,curr, i + 1)  
        curr.pop()