DSA Factory
Curriculum
Level 2 · Core

Recursion

About 20 steps, from the first idea to a mastery test.

  1. Stage 0A function that calls itselfFree
    1. 1Sum of digits8 min
    2. 2Reverse a string9 min
    3. 3Same both ways10 min
    4. 4Power in a few steps12 min
  2. Stage 1Lists and stringsFree
    1. 1The first value and the rest10 min
    2. 2Split the list in two11 min
    3. 3Cancel neighbouring twins13 min
    4. 4Write a number in binary11 min
  3. Stage 2Divide and conquerFree
    1. 1The best stretch, half by half16 min
    2. 2Who has more than half the votes14 min
    3. 3Move the tower14 min
    4. 4Fibonacci in a few steps17 min
  4. Stage 3Include or skipFree
    1. 1Take it or leave it14 min
    2. 2Strings with no two 1s together13 min
    3. 3Use the coin again, or move on15 min
    4. 4Two piles as even as possible14 min
  5. Stage 4MasteryFree
    1. 1Unfold the brackets18 min
    2. 2Grow the row16 min
    3. 3Every way to bracket a sum20 min
    4. 4Peaceful queens20 min
Start freeTry a step first