02.01 · Lesson
Draw the Tree: Pick or Skip
Most recursion questions in tests are a list of choices: take this item or not, go left or right. The best habit: draw the tree for a tiny input before you write code.
Example: all subsets of [1, 2]
For each number there are two choices: pick it or skip it.
solulu Pro
Continue this lesson with Pro
Inside: 5 sections · 1 video · quiz.
- Example: all subsets of [1, 2]
- From the tree to the code
- One tree, four questions
- How big is too big?
- Remember
Lifetime ₹1,999 ₹999 · Launch offer
Item 12 of 44 · updated 2026-10-13