A Fenwick Tree uses 1-based indexing. Position stores the sum of elements from to .
Index (binary): 1(1) 2(10) 3(11) 4(100) 5(101) 6(110) 7(111) 8(1000)
Stores sum of: [1] [1,2] [3] [1-4] [5] [5,6] [7] [1-8]
Position stores element (lowbit = 1). Position stores elements (lowbit = 2). Position stores elements (lowbit = 4). Position stores elements (lowbit = 8).
Each position covers a different "responsibility range." Together, they allow computing any prefix sum in additions.