← Back to Difficulty Selection
Code Review (Easy): Finding the Momentum Peak
Story
Lena is working on a new dashboard feature for ReviewThat Labs that highlights a team’s strongest performance window based on a list of daily impact scores. Since some days have negative scores due to technical debt or outages, she needs to find the specific consecutive period where the total impact reached its highest point. Mark pointed out that this helper would be useful for several different internal metrics, so it needs to be reliable and handle varying sequences. For example, if a team’s scores over several days were -2, 1, -3, 4, -1, 2, 1, -5, and 4, the tool should correctly identify that the most impressive stretch resulted in a total score of 6.
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: Finding the Middle Ground