Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
vkou
4y ago
0 comments
Save
Share
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.
0 comments
8 comments · 3 top-level
top
newest
oldest
arethuza
4y ago
· 3 in thread
What would you do if a candidate said with a smile "I'm pretty sure it is O(n!)"?
enedil
4y ago
Parent commenter asked for little o, not for big O. So to be safe, better say n^o(n^2).
robertlagrant
4y ago
Hah 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!)?”
krainboltgreene
4y ago
· 2 in thread
I'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 ago
Also a ton of important software was written as a giant mess of spaghetti code, or with horrible security vulnerabilities.
krainboltgreene
4y ago
I'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?
1 more reply
sailingparrot
4y ago
Except for the fact that using foreach instead of for has no impact on your O(n) performance.
j
/
k
navigate · click thread line to collapse