Glossary: Coding Interviews in JavaScript
Backtracking
Building an answer one choice at a time: choose an item, explore the rest by recursion, then un-choose so the next branch starts clean. It suits 'all combinations' problems on small inputs.
Glossary: Coding Interviews in JavaScript
Building an answer one choice at a time: choose an item, explore the rest by recursion, then un-choose so the next branch starts clean. It suits 'all combinations' problems on small inputs.