intqueue = sorted([(x[0], +1) for x in intervals] + [(x[1], -1) for x in
    intervals])
rsum = [(0, 0)]
for x in intqueue:
    rsum.append((x[0], rsum[-1][1] + x[1]))
busiest_start = max(rsum, key=lambda x: x[1])
Algorithm for finding the busiest period?