summaryrefslogtreecommitdiff
path: root/content/math/modMulIterativ.cpp
AgeCommit message (Collapse)Author
2024-07-28Test (#4)mzuenni
* update * moved content in subdir * rename file * add test setup * add test setup * add github actionvector<int> FT; // Fenwick-Tree int n; // Addiert val zum Element an Index i. O(log(n)). void updateFT(int i, int val) { i++; while(i <= n) { FT[i] += val; i += (i & (-i)); } } // Baut Baum auf. O(n*log(n)). void buildFenwickTree(vector<int>& a) { n = a.size(); FT.assign(n+1,0); for(int i = 0; i < n; i++) updateFT(i,a[i]); } // Präfix-Summe über das Intervall [0..i]. O(log(n)). * separate workflows * fix workflow * more workflows --------- Co-authored-by: Yidi <noob999noob999@gmail.com>