Search⌘ K
AI Features

Useful Formulas

Explore key mathematical formulas that help evaluate the time complexity of algorithms, including summations and logarithmic properties. Understand how to apply these to analyze iterative and recursive code for efficient programming and interview success.

We'll cover the following...

Formulas

Here is a list of handy formulas which can be helpful when calculating the time complexity of an algorithm:

Summation Equation
(i=1nc)=c+c+c++c\left(\sum_{i=1}^n c \right) = c + c+ c + \cdots + c cncn
(i=1ni)=1+2+3++n\left(\sum_{i=1}^n i \right) = 1+2+3+\cdots+n n(n+1)2\frac{n(n+1)}{2}
...