Segment Trees

Segment trees are a category of data structures which can handle range queries efficiently.