← Back to Difficulty Selection
Code Review (Easy): The Dashboard Puddle Problem
Story
While designing a new layout for the internal portal, Lena Sato realized that the varying heights of the data widgets created deep valleys across the interface. Eva Harrington suggested adding a clever weather effect where virtual rain fills these gaps, and she asked Lena to write a utility to calculate exactly how much water would be trapped between the blocks. For example, if a row of widgets had heights like 4, 2, 0, 3, 2, and 5, the tool should determine that the dips would hold a total of 9 units of water. Mark Patel is waiting for this logic so he can finalize the animation for the next team update.
Your Task
Read the story and code, then decide if the code is ready for production or needs improvement.
Hints
What would block an approval? Give me a hint.
Next
Check out Next Topic: The Milestone Matcher