Salesforce interview question

A scheduling problem. Very similar to question 253 on leetcode.