This theory is part of Premium
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricingWalk every mask that fits inside a mask with s = (s - 1) & mask.
What this asks
List every submask of a given mask.
Walk the state with s = (s - 1) & mask from the mask itself down to 0.
The full write-up (worked counting examples, the trap list and the interview playbook) unlocks with a Premium plan, along with every Pro visualizer.
See pricing