Fenwick Tree (Binary Indexed Tree) — watch prefix-sum queries hop DOWN by lowbit and point-updates ripple UP by lowbit in O(log n).
Fenwick Tree · Binary Indexed Tree · n=8array celltree cellcurrent hopaccumulatedupdated
Ready
Default array loaded: a = [3,2,5,1,4,6,2,7]. The BIT is built from it. Enter k and press Query to see how prefix sum hops down via i -= lowbit(i); enter idx + delta and press Update to watch the ripple go up via i += lowbit(i).