← LessonsCREATOR PATH Β· 10–12🌳

Treehouse LRU Shelf

LESSON 146
🎯 Today's missions
πŸŒ³πŸ§šπŸ„
ENCHANTED FOREST

Treehouse LRU Shelf

The fairy treehouse has only three hooks for magic ingredients, but the forest has hundreds. Build a shelf that always keeps the ingredients fairies are using most within reach.

🧠 Before we start

Guild Union Find kept groups tidy. Today's LRU cache keeps a small, fast shelf of things you used lately. LRU means Least Recently Used: when the shelf is full, the thing nobody has touched for the longest time leaves first.

πŸ”Ž Look→⬆️ Refreshβ†’πŸšͺ Make roomβ†’πŸͺ Shelve
Challenge 1 of 4Build the strategy
1

Build the shelf strategy

Tap the four cards in the order the treehouse follows every time a fairy asks for an ingredient.

THE SHELF ROUTINE Β· SAME STEPS EVERY REQUEST
1 Β· LOOK
2 Β· USED
3 Β· FULL
4 Β· PLACE

🌟 What you learned

Come back tomorrow for another advanced visual coding adventure! ✨