Permutations
Recognize the pattern
Brute force idea
If you approach Permutations in the most literal way possible, you get this: Not applicable — generating all permutations IS the problem. Output size is n!, which is unavoidable. It is a fair place to begin because it matches the surface of the question, yet it does not capture the deeper structure that makes the problem simpler.
Better approach
The deeper shift in Permutations is this: Backtracking: pick each unused element for the current position, recurse for remaining positions, then unpick. — one recursive call per permutation. Once you hold onto the right piece of information from moment to moment, the problem feels less like trial and error and more like following a shape that was there all along.
Key invariant
At the center of Permutations is one steady idea: At each position, try every element that hasn't been used yet. After exploring all choices for deeper positions, undo the choice (backtrack) and try the next element. When you keep that truth intact, each local choice supports the larger solution instead of fighting it.
Watch out for
A common way to get lost in Permutations is this: Not properly tracking which elements are used — a boolean array or set prevents reusing elements. Swapping elements in-place is an elegant alternative that avoids extra tracking. Most mistakes here are not about syntax; they come from losing track of what your state, pointer, or structure is supposed to mean.