Math Fundamentals18 sections · 814 units
Open in Course

Sequential Loops

(Addition rule)

If you have two separate loops that each run n times, the total is 2n operations. This is O(n), not O(2n).

Constants disappear. O(n) + O(n) = O(n). O(n²) + O(n) = O(n²) because the quadratic term dominates.

Sequential operations add, then you drop lower-order terms.