Back to problems

Find All 5-Minute Intervals

Algorithm · DoorDash · Medium

You are given two datetime strings, start and end, both formatted as "Day HH:MM AM/PM" (for example, "Mon 10:00 AM" or "Fri 12:00 PM"). The week is treated as a cycle starting with Monday. Produce every timestamp that falls exactly on a 5‑minute boundary within the half‑open interval (start, end]. In other words, begin 5 minutes after the start time and continue generating timestamps spaced 5 minutes apart until you reach or pass the end time. The start time itself must not…

Checking your access…