← Lessons BUILDER PATH Β· 7–9 πŸŽͺ

Circus Ring Buffer

LESSON 135
🎯 Today's missions
πŸŽͺπŸŽŸοΈβ†»
CIRCUS CODE

Circus Ring Buffer

A burst of performers is arriving faster than the ringmaster can announce them. Store each act in a fixed circle, serve the oldest ticket first, and never overwrite a waiting performer.

🧠 Before we start

Circus Event Relay sent signals between acts. Today, a circular queue safely holds a burst of those signals: new work joins at the tail, old work leaves from the head, and both pointers wrap around reusable slots.

🎟️ Add at tailβ†’πŸŽ¬ Serve head→↻ Wrap aroundβ†’βœ‹ Pause when full
Challenge 1 of 4Build the queue rules
1

Build the ringmaster's rules

Tap the visual instruction blocks in order. A bounded queue checks for room, stores at the tail, serves from the head, then reuses slots by wrapping.

CIRCULAR QUEUE Β· FIXED SPACE, MOVING POINTERS
1 Β· CHECK
2 Β· ADD
3 Β· SERVE
4 Β· WRAP

🌟 What you learned

Come back tomorrow for another advanced visual coding adventure! ✨