Fenwick Trees

In this post I will talk about Fenwick Trees aka Binary Indexed Trees. I got to use them recently while solving a problem in a coding challenge. Problem: Let's say we have an array of N positive integers. We need to be able to serve the following two operations efficiently: GetPrefixSum(i) - Gets the cumulative... Continue Reading →

Create a free website or blog at WordPress.com.

Up ↑

%d bloggers like this: