For each problem, decide: sqrt decomposition, MO's algorithm, or segment tree? Range sum with point updates, operations: Segment tree (log factor matters at scale)
Count distinct in range, offline, queries: MO's algorithm (segment tree can't do this easily)
Range min with occasional updates, quick implementation: Sqrt decomposition (simplicity wins)
Range add with range sum, operations: Segment tree with lazy (sqrt is too slow) These choices become intuitive with practice. Time: . Space: .