Fenwick trees, also called Binary Indexed Trees, help quickly find sums of elements from the start of an array up to any position. We build a fenw array one element larger than the input to use 1-based indexing. To update, we add a value at an index and then move to the next relevant node by adding the last set bit of the index. To query a prefix sum, we add fenw values moving down by subtracting the last set bit until we reach zero. This process is efficient and runs in logarithmic time. The execution table shows building fenw from an array, querying sums, and updating values step-by-step.