Big-O is not about time! [00JS]

Students coming out of data structures often think that big-O is specifically about measuring how long algorithms take, but it is not. Big-O is a tool for measuring the rate of growth of one thing relative to another. We often do use it to measure the rate of growth of the time needed to run an algorithm relative to the size of the input, but we can use it to measure rates of growth of other things as well, such as the amount of memory used relative to the size of the input, the height of a tree relative to the width, and so on.

So, for example, you should not assume that the questions in [O1] Big-O review (3 pts) are asking about time unless they explicitly say so. For example, part (a) is asking how many leaves there are in a tree with a depth of n, that is, how fast does the number of leaves grow relative to the depth? It is not asking how long it would take to find those leaves.