The idea: with elements, there are subsets. Loop through all integers from to , treating each as a bitmask.
For each mask, build a subset by including element if bit is set. For and mask , bits 0 and 2 are set, so the subset is .
This approach is elegant because it directly maps the binary representation of numbers to subsets. No recursion needed.