Subsets
Signals to notice
Brute force first
Not applicable — generating all subsets IS the problem. There's no shortcut because the output is 2^n subsets. That instinct is useful because it follows the prompt literally, but it usually keeps revisiting work the problem is begging you to organize.
The key insight
Backtracking: for each element, choose to include or exclude it. Build subsets incrementally. — unavoidable because that's the output size. Instead of recomputing the world every time, you preserve just enough context to let the next decision become obvious.
What must stay true
At each position, you make a binary choice: include the current element or skip it. Exploring all combinations of these choices generates every subset exactly once. As long as that statement keeps holding, you can trust the steps built on top of it.
Easy way to go wrong
Generating duplicates — process elements in order and only add elements at or after the current index to avoid permutations of the same subset. The fix is usually to return to the meaning of each move, not just the steps themselves.