Back to problems

Party Times / Peak Concurrent Parties (Time Range Overlap Counting)

Algorithm · Scale AI · Medium

Problem You are given a list of parties, each with a start and end time. For every whole hour of the day (0 through 23), count how many parties are ongoing at that exact hour. Then identify the hour with the highest count and return that hour along with the maximum count and the full 24‑hour breakdown. You must implement the function: n – the number of parties. parties – a list of n tuples, each containing two strings in "HH:MM:SS" format (24‑hour clock) representing the…

Checking your access…