Skip to content

Week 1 · A Recursion Triple ​

This round is all about recursion!

The three problems really share one theme — the illustrious recursion.

Even though engineering practice treats recursion with caution, it genuinely is an important way of thinking about problems. The three problems this week come from CS61A.

The first two train the instinct for "breaking a big problem into subproblems" — counting coins splits by denomination, digit distance splits by digit.

For the third, we pack recursion into C++23's std::generator and feel the one-two punch of "recursion + coroutines".

题目加载中…
题目加载中…
题目加载中…

Where the problems come from: All three problems this week are drawn from UC Berkeley's CS61A homework and lab exercises (Count Coins / Digit Distance / Hailstone). They were proposed and hand-picked by the great owollz4, and we gave them a light C++-flavored adaptation — the same problem, tackled the Python-course way and the Modern C++ way, reads delightfully different when you compare the two side by side.

pdf-latest-4-g85128cc · 85128cc · 2026-10-05