Intervals - Count of Intervals Containing Each Point
Consider two approaches to count intervals containing each point:
1) Sorting intervals and points, then using binary search to count intervals starting before and ending after each point.
2) Using a line sweep algorithm with event sorting.
When is approach 1 preferable over approach 2?
