Skip to main content

Practice · 3 of 5

Reproduce the trace

CHALLENGE
Difficulty: intermediate+25 XP

Implement process exactly as the lesson's trace describes: pass 1 transforms in place (evens halved and counted, odds doubled-plus-one), pass 2 sums, return sum − count. Verify your trace table predicts process({3, 4, 5}) == 19 before submitting.

Back to lesson: Practice: Mixed clinic