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 ``` pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy