When analyzing algorithms, you write time complexity as a formula in terms of input size . Algebra helps you simplify these formulas.
For example, if you have nested loops where the outer runs times and the inner runs times, the total is operations. You write this as .
If you have operations, you drop constants and lower-order terms to get . Algebra tells you which term dominates as grows.