Skip to main content
๐Ÿ“œ WAYPOINT LESSON

Checkpoint: digital root

โญโญโญ advancedโณ 20 min read๐Ÿ“ Lesson 200 of 256

Two recursive layers: digit sum inside, self-recursion outside.

The digital root is recursion composed with recursion: an inner helper consumes digits while an outer process consumes the results. Both base cases are visible in the example trace โ€” find them before writing anything.