Back to problems

Find Peak Event Moment

Algorithm · Snapchat · Medium

Note: This challenge is a variant of a well-known meeting rooms interview problem; it may help to be comfortable with that original puzzle before attempting this one. You're hosting a private function, and each attendee is represented by a time interval. For a given attendee, the pair [entry, exit) means they are on the premises at every integer timestamp t where entry ≤ t Input: times = [[1, 3], [2, 4]] Output: 2 Explanation: - At time 1, only the first guest is present. -…

Checking your access…