Skip to content
LUDA · 學思辨行

LUDA · 學思辨行

Learn extensively, Understand deeply, Discern clearly, and Act resolutely.

  • About
  • Learning Path

Category: Range Queries

How square-root decomposition sums a range by blocks

November 13, 2026By HoHo Zhao

Short answer: Square-root decomposition breaks an array into contiguous blocks of length about √n. Each block stores the sum of its cells. A point update changes one cell and one block sum. A range sum adds the complete blocks in the middle and walks the loose cells at each…

Algorithms, Range QueriesLeave a comment

How Mo’s algorithm orders offline range queries

November 13, 2026By HoHo Zhao

Short answer: Mo’s algorithm answers a batch of range queries offline when a window can grow or shrink by one cell at a known cost. Sort the queries by the block of the left endpoint and, inside a block, by the right endpoint. Move the current window’s ends to…

Algorithms, Range QueriesLeave a comment
  • Algorithms
  • Arithmetic
  • Authelia
  • Clustering
  • Coding
  • Compression
  • Cryptography
  • CSS
  • Distributed Systems
  • Docker
  • Dynamic Programming
  • Exact Algorithms
  • Games
  • Geometry
  • Grafana
  • Graphs
  • Greedy
  • Heaps
  • Homelab
  • IPsec
  • LDAP
  • Linear Algebra
  • Logging
  • Loki
  • nginx
  • Number Theory
  • Numerical
  • Optimization
  • Parsing
  • Prometheus
  • Randomization
  • Range Queries
  • Sampling
  • Scheduling
  • Search
  • Searching
  • Sequences
  • Sketches
  • Sorting
  • Streams
  • Strings
  • SVG
  • Synchronization
  • Systems
  • Transforms
  • Trees

Docker EAP-MSCHAPv2 FreeRADIUS Grafana gzip IKEv2 IPsec LogQL Loki OpenLDAP Promtail StrongSwan

© 2026 LUDA · 學思辨行. Powered by WordPress.