Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Clarification needed for employee's end time

David Murga

Aug 10, 2025

The following example returns [5,7] [[[1,3]], [[2,4]], [[3,5], [7,9]]]

Which assumes employee 1 and 2 are around as long as employee 3. If all employees are free as long as they're not working, then the answer should return

[5,7], [9, 12 / some end time]

The question doesn't specifically state it, but it assumes employees are around until the last employee is, which should be clarified in the question

0

0

Comments
Comments

On this page