class Solution: # @param S, a list of integer # @return a list of lists of integer def subsets(self, S): res = [[]] for e in sorted(S): res = res+[l+[e] for l in res] return res
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment