From f2e2208a75fa3ec73f5372794a68e97e77723584 Mon Sep 17 00:00:00 2001 From: Arjun Patel <45395213+arjunUpatel@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:18:31 -0500 Subject: [PATCH] Update fenwick.md The current bounds on j in the function do not match the summation a few lines above where the lower bound is g{i) and the upper bound is i. This change attempts to fix this disparity. --- src/data_structures/fenwick.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data_structures/fenwick.md b/src/data_structures/fenwick.md index 82755b452..d423f9289 100644 --- a/src/data_structures/fenwick.md +++ b/src/data_structures/fenwick.md @@ -58,7 +58,7 @@ def sum(int r): return res def increase(int i, int delta): - for all j with g(j) <= i <= j: + for all j with g(i) <= j <= i: t[j] += delta ```