Backtracking is controlled brute force. You explore all possibilities, but you prune branches that can't lead to valid solutions. Without this skill, you'll timeout on problems that require exploring combinatorial spaces. Every backtracking problem follows the same template: make a choice, recurse, undo the choice. The 'undo' step makes it backtracking. I'll show you patterns here. Start with Subsets (the foundation), then Permutations and Combinations. Finish with constraint problems like Generate Parentheses and Word Search.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/maang-interview-prep/backtracking/intro
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████████████████████████████████████████████████████████████████████