Question
In Python( no built in function except sort) : Design a function to help organize multiple meetings during a day. Each meeting will have a
In Python( no built in function except sort) :
Design a function to help organize multiple meetings during a day. Each meeting will have a start time and end time.
Each meeting will need to reserve a private conference room during that time. Your function will take all the meeting schedules and calculate the minimum number of conference rooms you will need.
Here are the requirements:
1. The function will take the input as a sequence of lists, each list only contains two numbers, the start time and the end time.
For simplicity, we assume the time is just a float number in the range of 0.0 to 24.0.
For example, the function may be given the following input:findMinRooms([1.2, 3.4], [2.3, 5.0], [3.1, 8.0]) Your code should return 3 as the result, since during this time window [3.1, 3.4], all three meetings will be going on in parallel.
Another example:findMinRooms([1.2, 3.4], [2.3, 5.0], [4.1, 8.0])this will return 2.
Another example:findMinRooms([1.2, 3.4], [2.3, 5.0], [3.1, 8.0], [1.0, 10.0])this will return 4.
2. Your function should be able to handle any number of arguments.
3. The sequence of meetings can be input in any order.
4. Your function should handle all wrong inputs gracefully, by catching all errors and display meaningful error messages. There should be no error/crash from the system.5. Dont do brutal force implementation, i.e., by checking each meeting against every other meeting to count the time overlaps. Hint: You will need to re-organize and sort the data in some smart way.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started