Given a set of intervals I, each element of the form [a_i, b_i], find an end point b_i of maximum depth in O(n*logn) time. Define depth of x as the number of intervals the point "stabs" (or intersects). If two end point have the same depth, return the smaller one.
Attempt:
I have no idea how to find it in O(n * logn) time. I understand the greedy algorithm for finding the stabbing set of a set of intervals, but finding an end point with strictly O(n * log n) time seems very different.
I can try and first sort the intervals and brute force a maximum depth end point but that does not guarantee O(n * log n) time.
You can try the following: