Complexity: reading it off, and deriving it
The master theorem
Compare with : whichever dominates gives the answer, and if they match you gain a .
Remember
- Know the four-column table for the standard structures without thinking.
7 lessons · 2 equations. Each lesson below gives its formulas and key rules; open the lesson for the full explanation.
The master theorem
Compare with : whichever dominates gives the answer, and if they match you gain a .
Remember
Key rules
The Fenwick tree’s one trick
A Fenwick (binary indexed) tree stores partial sums in a flat array. Index holds the sum of the last elements up to ; stripping or adding the lowest set bit walks the nodes a prefix query or a point update needs.
Remember
Key rules
Key rules
Key rules
Key rules