From 38728c9fdc88c32c0784d3592d1267b331625bee Mon Sep 17 00:00:00 2001 From: ANUJ YADAV <52133014+ANUJ581@users.noreply.github.com> Date: Fri, 2 Oct 2020 19:44:13 +0530 Subject: [PATCH 1/2] Update Binary Index Tree.java --- Binary Index Tree.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Binary Index Tree.java b/Binary Index Tree.java index 29b82c3..9dbb302 100644 --- a/Binary Index Tree.java +++ b/Binary Index Tree.java @@ -24,7 +24,7 @@ public BinaryIndexedTree(int[] arr){ int sum = 0; for(int i = 1; i < this.size; i++){ - sum += arr[i]; + sum = sum + arr[i]; prefix[i] = sum; } @@ -85,4 +85,4 @@ public static void main (String[] args) throws java.lang.Exception{ System.out.println("" + BT.rangeSum(1,5)); } -} \ No newline at end of file +} From 3cf18eff467e3e6c395a8e4c292cdcb2095e946b Mon Sep 17 00:00:00 2001 From: ANUJ YADAV <52133014+ANUJ581@users.noreply.github.com> Date: Sat, 3 Oct 2020 18:34:06 +0530 Subject: [PATCH 2/2] commented --- AVL.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AVL.java b/AVL.java index 7f0fbeb..3a4fa1d 100644 --- a/AVL.java +++ b/AVL.java @@ -220,5 +220,5 @@ public static void main (String[] args) throws java.lang.Exception{ tree.print(1); tree.print(2); tree.print(3); - } + }//hello frnd }