A Fenwick tree stores a changing array so that a point update and a prefix sum query each take time with storage. With indices starting at , the entry at stores the sum over the final block of length ending at . A query repeatedly removes that final block, while an update visits the blocks containing the changed position.
Articles by others on the same topic
There are currently no matching articles.