segment-tree

What are the differences between segment trees, interval trees, binary indexed trees and range trees?

十年热恋 提交于 2019-11-26 21:12:40
What are differences between segment trees, interval trees, binary indexed trees and range trees in terms of: Key idea/definition Applications Performance/order in higher dimensions/space consumption Please do not just give definitions. All these data structures are used for solving different problems: Segment tree stores intervals, and optimized for " which of these intervals contains a given point " queries. Interval tree stores intervals as well, but optimized for " which of these intervals overlap with a given interval " queries. It can also be used for point queries - similar to segment