Power Set
Last updated
Last updated
8.4 Power Set: Write a method to return all subsets of a set.
The power set intuitively represents all the possible subcombinations you can have in given set. In other words, the power set represents all possible combinations for k = 0...n, where n is the length of the set.
The power set gross at pow(2, k), where k is the length of the set.
ex.
Pascals triangle provides us the amount of combinations per level, for any 'choose'. The growth is exponential.
Every additional case feeds on the previous cases by appending a additional unique element to the end of the string.