Segment Tree

Range queries + point updates in O(log n). Supports sum, min, max, and GCD.
Update idx: Query:
Segment tree for range queries