Software Engineering KB

Home

❯

01 Foundations

❯

00 Data Structures

❯

02 Sub Concept

❯

Range Queries

Range Queries

Feb 10, 20261 min read

  • property
  • segment-trees

Range Queries

← Back to Segment Trees and Fenwick Trees

Answer aggregate queries (sum, min, max, GCD) over a contiguous subarray in O(log n) after O(n) preprocessing. Without these structures, each query would be O(n).

property segment-trees


Graph View

Backlinks

  • Segment Trees and Fenwick Trees
  • Range-Based Partitioning

Created with Quartz v4.5.2 © 2026

  • GitHub