Subset Enumeration
← Back to Bitmask DP
Using bitmasks to represent and iterate over all subsets of a set. A bitmask of n bits represents 2^n possible subsets. Enables compact state representation in DP problems involving subset selection, making O(2^n * n) algorithms feasible for small n.