Ballista's blog

By Ballista, history, 5 years ago, In English

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)?

  • Vote: I like it
  • 0
  • Vote: I do not like it