Latihan Matematika Diskrit

Fenwick Tree Prefix Sum

Browse Fenwick Tree Prefix Sum lessons inside Algorithmic Thinking and Complexity.

1 lessons · 5 questions

Algorithmic Thinking and Complexity

Big-O, loop analysis, graph algorithms, invariants, and developer-focused discrete math.

1 lessons · 410 questions

Fenwick Tree Prefix Sum

1 lessons · 5 questions

Least You Need to Know: Fenwick Trees, Prefix Sums, and Low-Bit Jumps

Fenwick trees support prefix-sum queries and point updates in `O(log n)` by storing carefully chosen partial sums. The key bit trick is the low bit, which tells how large a range each index is responsible for.

Buka pelajaran