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