Implementation of a one-dimensional, two-dimensional Fenwick tree and a Fenwick tree with pending operations.