Max Overlapping Intervals

PHP Hard 6 views
Back to Questions
Previous Queue Rotation Hard P

Problem Description

Given n intervals [l,r], find the maximum number of overlaps at any point.

Input Format

First n. Next n lines: l r.

Output Format

One integer maxOverlap.

Sample Test Case

Input:
3 1 5 2 6 4 7
Output:
3

Constraints

n

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev