← back to unit
Easy
# stacks easy
The Paint Layers
The fence has been painted and re-painted for years — peel to see history, paint to bury it. 🎨
You get commands — paint:red or peel (peels always valid). Print the color showing at the end, or bare wood if every layer is gone.
Example:
Input: commands = ["paint:red", "paint:blue", "peel"]
Output: red
blue was painted on top of red. Peeling removes blue, so red shows through again.
💡 need a hint?
stk-paint-layers.py🔒 given lines are locked — write your code in between
loading...