Concepts2
🗂️Data StructureIntermediate
Fenwick Tree (Binary Indexed Tree)
A Fenwick Tree (Binary Indexed Tree) maintains prefix sums so you can update a single position and query a prefix in O(\log n) time with a tiny constant factor.
#fenwick tree#binary indexed tree#prefix sum+11
🗂️Data StructureIntermediate
Policy-Based Data Structures
Policy-Based Data Structures (PBDS) are GNU C++ extensions that add advanced containers like an order-statistics tree, a fast hash table, and ropes for efficient string edits.
#policy based data structures#pbds#ordered set+12