3 ms·
If you can't give me the o(n) performance of the algorithm that you just wrote, this is a pretty serious red flag about your ability to understand what you are
by vkou 4y ago
If you can't give me the o(n) performance of the algorithm that you just wrote, this is a pretty serious red flag about your ability to understand what you are writing.
- sailingparrot 4y agoExcept for the fact that using foreach instead of for has no impact on your O(n) performance.
- arethuza 4y agoWhat would you do if a candidate said with a smile "I'm pretty sure it is O(n!)"?
- enedil 4y agoParent commenter asked for little o, not for big O. So to be safe, better say n^o(n^2).
- robertlagrant 4y agoHah this is the best comment.
- xigoi 4y ago“So you want to put code into production without having a better estimation of its time complexity than O(n!)?”
- deleted 4y ago[deleted]
- krainboltgreene 4y agoI'm going to blow your mind but a ton of important software was written by people who have a hard time explaining these things.
- mikebenfield 4y agoAlso a ton of important software was written as a giant mess of spaghetti code, or with horrible security vulnerabilities.
- krainboltgreene 4y agoI've never been tested on my ability to not write spaghetti code or write security vulnerabilities in my 15 years doing many many interviews. Unless you're suggesting that knowing the performance of a loop helps with that?
- mikebenfield 4y agoWhat I'm suggesting is that "Important software has been written by people who couldn't/didn't do X" is not a very strong indication that X is not a valuable quality that employers should want in their engineers.