I read the following in CLRS 3rd Ed:
I'm not sure I understand exactly how to avoid this pitfall.
- How would one know that the $\mathcal{O}$ notation in this case grows with $n$ and is thus not constant?
- What's a good way to systematically avoid this type of pitfall?