DSA Advanced Problems

Count Integers in Intervals

Maintain inclusive integer intervals online and report the number of distinct covered integers after any addition.