← Back to Difficulty Selection

Code Review (Easy): Cleaning the Maintenance Schedule

Story

Lena was putting the finishing touches on the internal dashboard that tracks scheduled server maintenance windows. During the code review, Mark pointed out that adding a new time slot often overlaps with existing ones, creating messy, redundant entries on the calendar. To fix this, she needs to ensure that any new request is integrated into the existing list, merging any touching or overlapping blocks into one continuous window. For example, if the system already has windows booked for 1:00 to 3:00 and 6:00 to 9:00, adding a new request for 2:00 to 5:00 should result in a clean schedule showing 1:00 to 5:00 and 6:00 to 9:00.

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: Verifying Activity Streams

Cookies help us track your progress - nothing extra.