Monday, October 3, 2011

Interview question: Set to subsets

Given a set as input, return the set of all possible subsets. e.g. {a, b} => { {} , {a}, {b}, {a, b} }

No comments:

Post a Comment