Created
July 16, 2021 08:01
-
-
Save hectorj2f/4205a38ff126adf1ac6689572d73670f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given two people calendars, find the blocks of time when both can attend to a meeting. | |
Drew's spare blocks of time: [[10:00, 11:30], [12:30, 14:30], [14:30, 15:00]] | |
Drew begins his day at 10:00 and leaves at 18:30, ([10:00, 18:30]). | |
Julian's spare blocks of time: [[09:00, 10:30], [12:00, 13:00], [16:00, 18:00]] | |
Julian begins his day at 09:00 and leaves at 20:00, ([09:00, 20:00]). | |
Expected Result: | |
* Slot: 10:00 -- 10:30 | |
* Slot: 12:30 -- 13:00 | |
Goal: Write a function that returns the list of blocks of time when to schedule a meeting between them. | |
Notes: | |
* You can assume the times are sorted | |
* You can expect valid inputs | |
* 3pm is 15:00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment