Coder Social home page Coder Social logo

sciustea / meetings-organizer-function_findminrooms_python Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5 KB

Python function designed to help organize multiple meetings during a day. Each meeting has a start time and end time. Each meeting needs to reserve a private conference room during that time. The function takes all the meeting schedules and calculates the minimum number of conference rooms needed.

Python 100.00%
computer-science python

meetings-organizer-function_findminrooms_python's Introduction

Meetings-Organizer-Function_findMinRooms_Python

"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. The function will take all the meeting schedules and calculate the minimum number of conference rooms you will need. The requirements are:

  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]) 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. The function should be able to handle any number of arguments.

  3. The sequence of meetings can be input in any order.

  4. The 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. No brutal force O(N^2) implementation, i.e., by checking each meeting against every other meeting to count the time overlaps. Hint: Need to re-organize and sort the data in some way, after that, only need to go through the data once to find the answer."

meetings-organizer-function_findminrooms_python's People

Contributors

sciustea avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.