Every subset of {1, 2, 3}. Look at one element at a time: include it and go on, then come back, exclude it and go on. Reaching the end of the array is a leaf, and every leaf is a different subset: 2 to the 3 = 8 of them.
Generating all 8 subsets of 3 values by include-or-exclude recursion.
Element 0 is 1. First branch: include it, chosen is now {1}. Go deeper.
Include 1 and recurse.
Element 1 is 2. First branch: include it, chosen is now {1, 2}. Go deeper.
Include 2 and recurse.
Element 2 is 3. First branch: include it, chosen is now {1, 2, 3}. Go deeper.
Include 3 and recurse.
Past the last element: a leaf. Subset 1: {1, 2, 3}.
Leaf. Subset 1 is {1, 2, 3}.
Back at element 2. Undo: drop 3, chosen is {1, 2}. Second branch: exclude it and go deeper.
Exclude 3 and recurse.
Past the last element: a leaf. Subset 2: {1, 2}.
Leaf. Subset 2 is {1, 2}.
Back at element 1. Undo: drop 2, chosen is {1}. Second branch: exclude it and go deeper.
Exclude 2 and recurse.
Element 2 is 3. First branch: include it, chosen is now {1, 3}. Go deeper.
Include 3 and recurse.
Past the last element: a leaf. Subset 3: {1, 3}.
Leaf. Subset 3 is {1, 3}.
Back at element 2. Undo: drop 3, chosen is {1}. Second branch: exclude it and go deeper.
Exclude 3 and recurse.
Past the last element: a leaf. Subset 4: {1}.
Leaf. Subset 4 is {1}.
Back at element 0. Undo: drop 1, chosen is { }. Second branch: exclude it and go deeper.
Exclude 1 and recurse.
Element 1 is 2. First branch: include it, chosen is now {2}. Go deeper.
Include 2 and recurse.
Element 2 is 3. First branch: include it, chosen is now {2, 3}. Go deeper.
Include 3 and recurse.
Past the last element: a leaf. Subset 5: {2, 3}.
Leaf. Subset 5 is {2, 3}.
Back at element 2. Undo: drop 3, chosen is {2}. Second branch: exclude it and go deeper.
Exclude 3 and recurse.
Past the last element: a leaf. Subset 6: {2}.
Leaf. Subset 6 is {2}.
Back at element 1. Undo: drop 2, chosen is { }. Second branch: exclude it and go deeper.
Exclude 2 and recurse.
Element 2 is 3. First branch: include it, chosen is now {3}. Go deeper.
Include 3 and recurse.
Past the last element: a leaf. Subset 7: {3}.
Leaf. Subset 7 is {3}.
Back at element 2. Undo: drop 3, chosen is { }. Second branch: exclude it and go deeper.
Exclude 3 and recurse.
Past the last element: a leaf. Subset 8: { }.
Leaf. Subset 8 is { }.
8 subsets: {1, 2, 3} {1, 2} {1, 3} {1} {2, 3} {2} {3} { }. Every element was included once and excluded once at each point in the tree, so the leaves number 2 to the 3 and none repeats.
8 subsets were generated.