dsa4 min read
Segment Trees & BIT (Fenwick Tree) — Complete Guide
Master Segment Trees and Binary Indexed Trees: range sum/min/max queries, point updates, lazy propagation, and 5-language implementations.
Read →
webcoderspeed.com
3 articles
Master Segment Trees and Binary Indexed Trees: range sum/min/max queries, point updates, lazy propagation, and 5-language implementations.
Support point updates and range sum queries. BIT (Fenwick Tree) gives O(log n) both operations with elegant implementation.
Design a log storage system that retrieves log IDs within a timestamp range at a specified granularity (Year, Month, Day, Hour, Minute, Second).