You are viewing a single comment's thread. Return to all 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
Seems like cookies are disabled on this browser, please enable them to open this website
Building a List
You are viewing a single comment's thread. Return to all comments →
Python Solution, I'm using a recursive method here