From a Step Count to Big-Oh

Solution
Expression Big-Oh

In each case, set every coefficient to and keep only the term that grows fastest.

Solution

The two parts run one after the other, so the costs add: , which is .

We may drop because it grows more slowly than : as grows, becomes a smaller and smaller fraction of , so it does not change how the work grows.