List every combination of candidates that adds up to a target, each used again or only once. Sort first, and a loop can stop at the first candidate bigger than what is left; at each depth try a repeated value only once.
This interactive visualization needs JavaScript.