Yes, but you saw code was not optimized, you didn't see the letters "O(n^2)" in the code.
I'm not asking why optimization is important, I'm asking about the notation that only seems to appear in interviews.
I'm not asking why optimization is important, I'm asking about the notation that only seems to appear in interviews.
It is important to distinguish between asymptotic optimization vs. i/o optimization vs. code optimization.
I'd argue if you can't do the first one you're less likely to be able to handle the next two. Yes, you can do it intuitively to some extent. However, I think it's important to be systematic about it so we can have meaningful conversations about it beyond "doing it this way is slow and if we do it this way it's faster."