O'Reilly logo
  • Kashyap Joshi thinks this is interesting:

When people see two linear operations, they sometimes think the result is quadratic, but that only applies if one operation is nested inside the other. If you invoke one operation after the other, the runtimes add. If they are both in O(n), the sum is also in O(n).


Cover of Think Data Structures


Important point. nested linear operation