Complexity analysis tells you how fast an algorithm is, independent of the CPU and independent of the time for individual steps. If print_line(w) takes 4w + 1 time steps, then we say the time is O(w). If print_square(w) takes 2w² + 3w + 1 time steps, then we say the time is O(w²). Big-O characterizes the way in which a function grows. In this case, the function is the amount of time to execute print_line(…) or print_square(…). If f(w) = 2w² + 3w + 1, then, we can say that: f(w) is O(w²) f(w) is O(w³) f(w) is O(w⁴) f(w) is O(2^w) f(w) is O(w^w) There is a hierarchy. SLOWEST ALGORITHM FOR BIG INPUT w^w w! 2^w w³ w² w * log(w) w log(w) 1 FASTEST ALGORITHM FOR BIG INPUT If you have: for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { } } ... it is quadratic. If you had the function f(…) for the actual number of steps... 1. Toss constant coefficients. 2. Toss lower order terms (according to the hierarchy above) ... gives you the Big-O time complexity. IMPORTANT PRACICAL TAKEAWAY: Do not worry about constant multiples when you are coding until you have optimized complexity. Linked list may be a few times more space, but for space it doesn't matter.