Subsets (power set)
mediumIn or out, n times, giving 2ⁿ outcomes. Every subset corresponds to a bitmask, which is the bridge from backtracking to bitmask dynamic programming.
Worst
O(n × 2ⁿ)Space O(n)Loading the subsets (power set) engine…