Count intervals in a given range

Revision en1, by Ballista, 2019-06-23 09:22:33

You are given N intervals and Q ranges. For each range you have to count number of intervals lying completely inside the range.

How can we do this query per range in O(log n)?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Ballista 2019-06-23 09:22:33 211 Initial revision (published)