Skip to main content

Practice · 4 of 5

Predict: bit echo

CHALLENGE
Difficulty: intermediate+25 XP

Trace g(5) with a state table (n, out). The while strips bits from the bottom and appends them to out — predict the return, then confirm by keeping the code and passing the tests.

Back to lesson: Practice: MCQ clinic