Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Room Booking Conflicts

A new booking for room 1 from 10:00 to 11:00 is requested. Return the number of existing bookings of that room that conflict with it.

Table schema

Bookings(id INT PRIMARY KEY, room INT, start_time TIME, end_time TIME)

Sample data

id | room | start_time | end_time
1 | 1 | 09:30 | 10:30
2 | 1 | 11:00 | 12:00
3 | 2 | 10:00 | 11:00

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.