I have $M$ resources, $N$ services and $L$ timetables where  $0 < M,N,L < 100\,000$.Here is a sample:Resources: car wash box #1, car wash box #2, car wash box #3Service: car washing program - duration 30 minTimetable: resources are available from 8.00-21.00A Record can then be made that consists of the following:Record: service, resource, interval -  (car-wash-box#1, car-washing program, 8.30-9.00 April 10)As an example of the problem I want to solve, I would like to be able to find all of the free intervals for the service (car-washing program) from April 7 to April 21 for each resource (car wash box #1, #2, #3, etc) taking into account the timetables (working hours) and existing records.What algorithm can I use for finding the free intervals?  What data structures can I use for storing these intervals?
Finding interval intersections
algorithms;data structures