AlgoViz

Subsets

medium 22 min

Generating every subset is the first backtracking pattern most interviews ask for, and there are four standard ways to write it: take-or-skip recursion, a start-index loop, iterative cascading and bitmask counting.

Practice

3 problems with hidden tests. Python runs in your browser.

Loading problem…
Loading problem…
Loading problem…