• + 0 comments

    Python Solution, I'm using a recursive method here

    def generateSubsets(s):
        if not s:
            return ['']
        subsets = generateSubsets(s[1:])
        return subsets + [s[0] + subset for subset in subsets]
    
    
    def solve(s):
        pl = generateSubsets(s)
        pl.sort()
        pl.pop(0)
        return pl