← 返回 microsoft 的题目列表Meeting Room Booking System with Hourly Slots
类型:online_judge
microsoft
Design a meeting room booking system.
Requirements
Each meeting room has a building ID, floor number, and a unique room ID.
Meetings are booked for 1-hour slots and must be on the hour; for example, you cannot book from 1:30 to 2:45. Meetings do not span across days.
Implement a calendar internally to track meetings for each room on each day.
Implement the following APIs
bookRoom(): Define your own parameters and return type internally. The functionality is to book a meeting in a meeting room (should return an error if booking cannot be made).
listMeeting(): Return all meetings for the day (Define your own data structure, but it must include meeting room and all time details).
Example
Input
book_room('101', '2023-01-01', 10)
list_meetings('2023-01-01')