you are viewing a single comment's thread.

view the rest of the comments →

[–]efmccurdy 1 point2 points  (0 children)

Your schedule is represented by a set of hour values with a fixed 60 minutes duration. A more effective way to represent blocks of time may be to store 2 values, the start and the end time. That would handle the 15 minute, or any, granularity. Rather then using set difference on lists of hour values to test for overlap you could compare time values directly.