3 ms·
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 no
by mmanfrin 13y ago
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.
- fournm 13y agoThe notation just happens to give a good shorthand when discussing bits of code, as it tends to be rather fast to calculate.
- lukeschlather 13y agoBig-o is about a specific class of optimization, and a theoretical understanding of it is important. 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."