Let $e_1,e_2,\cdots,e_n$ are some events are given by their starting time and ending time.
I have to find an event that conflict with maximum number of other events.
Conflicts means interval overlaps
The idea is as follows: Sort events according to their starting times and then for each event check whether it conflict with other evenets or not. The first step seems to me doable in $\mathcal{O}(n \log n)$ time, but second step i.e. to find the number of events with which it conflicts is seems to $\mathcal{O}(n)$ Can we do it in $\mathcal{O}(\log n)$ time?
Question : Is it possible to do the second step as mentioned above in $\mathcal{O}(\log n)$ time?