Skip to main content

Practice · 2 of 4

Q1 shape: state machine

CHALLENGE
Difficulty: intermediate+25 XP

Implement isBalanced (running count, never negative, ends at zero) and depth (track the running level, record its max). Both are one-pass counters over characters — the workflow's decomposition step names them instantly.

Back to lesson: Practice: FRQ fundamentals lab