Question: Please help with this simple Python coding problem, thanks!! 3. Calendar Chaos Description: Scheduling can be hard. You've realized after looking at your calendar that

Please help with this simple Python coding problem, thanks!!

Please help with this simple Python coding problem, thanks!! 3. Calendar Chaos

Description: Scheduling can be hard. You've realized after looking at your calendar

that you could simplify your very busy, very long day by re-organizing

3. Calendar Chaos Description: Scheduling can be hard. You've realized after looking at your calendar that you could simplify your very busy, very long day by re-organizing it so that your meetings with a single person throughout the day are instead combined into long, singular meetings. To help, you've separated your day into several equal-sized chunks. You're not the only one with a busy schedule though, your coworkers are busy too! They've provided their availability for your scheduling convenience. You notice that some weren't even available for your original meeting time! To prevent confusion, you'd also like to preserve the order that you see people for the first time throughout the day, if possible given your coworker's availabilities. For example, if you would see John first, then Mary, and then John again, you'd like to see John first and then Mary. Please write a function to reorder your schedule according to these constraints. Your function will be given an array of names representing your current schedule broken up into equal chunks of time. You will also be provided an array of arrays, each subarray containing a name in the original calendar, that person's starting in the original calendar, that person's starting availability (inclusive), and their ending availability (exclusive). Availabilities are meant to be human-readable and start at 1. The test cases are checking for both correctness and time complexity. Examples: Input: ['John', 'Mary', 'John', 'Peter', 'Susan', 'Peter'] Input: [['John', 2, 4], ['Mary', 1, 5], ['Peter', 5, 7], ['Susan', 3, 7]] Output: [ ['Mary', 'John', 'John', 'Susan', 'Peter', 'Peter'] Explanation: We'd like to see John first, but he isn't available so we see Mary first instead. Peter is similarly not available at his original time, so we see Susan first. Language Python 3 (i) Q Autoco

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!