Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

Students also viewed these Databases questions

Question

Why does sin 2x + cos2x =1 ?

Answered: 1 week ago

Question

What are DNA and RNA and what is the difference between them?

Answered: 1 week ago

Question

Why do living creatures die? Can it be proved that they are reborn?

Answered: 1 week ago

Question

3. What may be the goal of the team?

Answered: 1 week ago

Question

Is how things are said consistent with what is said?

Answered: 1 week ago