Search found 1 match

by MMMMMua.....
Sat Jan 24, 2015 10:05 am
Forum: Algorithms
Topic: Segment Tree question
Replies: 1
Views: 1217

Re: Segment Tree question

You have to build a segment tree in this way. That is, for every segment tree node, it stored a sorted sequence of it's interval(use vector to allocate memory dynamically). Obviously, the space complexity is O(nlogn). And, for every query, use binary search to find out how many numbers are smaller t...

Go to advanced search