summaryrefslogtreecommitdiff
path: root/datastructures
diff options
context:
space:
mode:
Diffstat (limited to 'datastructures')
-rw-r--r--datastructures/fenwickTree.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/datastructures/fenwickTree.cpp b/datastructures/fenwickTree.cpp
index 02be7d4..bb3f72d 100644
--- a/datastructures/fenwickTree.cpp
+++ b/datastructures/fenwickTree.cpp
@@ -1,8 +1,8 @@
vector<int> FT; //Fenwick-Tree
//Build an Fenwick-Tree over an array a. Time Complexity: O(n*log(n))
-buildFenwickTree(vector<int>& a) {
- n = a.size();
+void buildFenwickTree(vector<int>& a) {
+ int n = a.size();
FT.assign(n+1,0);
for(int i = 0; i < n; i++) updateFT(i,a[i]);
}