I was going through a blog (https://cp-algorithms.com/data_structures/segment_tree.html )
It says something like -
The query function is also almost equivalent, only now the lower_bound function of the multiset function should be called instead (std::lower_bound only works in O(logn) time if used with random-access iterators).
I need some help, to clarify few doubts(might help others too) —
- How can I define multiset with random-access iterators in C++?
- Can we find the rank of an element using it?
- How is it different from "C++ STL: Policy based data structures"?