Live data from Hacker News

Algorithms Interviews: Theory vs. Practice

danluu.com

21–30 of 77 posts

Re: Algorithms Interviews: Theory vs. Practice

#21

I actually suspect that one of the main purposes of the algo based interview process is a motivation check. It takes time to prep for these interviews. Lots of time. So if you get a candidate that is crushing problems, it can either mean two things: 1) They are exceedingly brilliant and they can program decently 2) They have studied hard, they can reason and code decently Combine that with a system design portion and…

If that’s what companies wanted they could remove the extremely biased human component and give an SAT like IQ test loaded with algorithms and objective design questions. The interviews right now are extremely biased and you get rejected just because some interviewer has a biased opinion of you based on how you act.

Re: Algorithms Interviews: Theory vs. Practice

#22
post #19

Opening statement: > When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down" In 20yeara I've never heard someone say anything like that.

If we are one query from bring down the site I don't want to be anywhere near that site.

Re: Algorithms Interviews: Theory vs. Practice

#23
> a friend of mine once got a Google Code Jam World Finals question in a phone interview with Google (...) I doubt there were more than a few hundred people in the world who would've gotten the right answer to the question in a phone screen and almost all of them probably would've realized that it was an absurd phone screen question

Link to the question: https://code.google.com/codejam/contest/2437491/dashboard#s=...

The gist of it is: You are given 4*N points on a 2D plane. Can you draw two perpendicular lines to separate them into N points per quadrant?

I think Dan's missing context is that google code jam questions always have a small and large dataset. In this case, small is N=10 which makes a lot of bruteforce solutions possible and not much different from any other bruteforce puzzles common in interviews. Being a geometry question is the more unfair part if this is a generalist role (but not unfair if your role involves graphics, computer vision, self driving car mapping, etc).

Expecting a solution for the large (N=2500) is ridiculous of course. See analysis: https://code.google.com/codejam/contest/2437491/dashboard#s=...

Re: Algorithms Interviews: Theory vs. Practice

#24

Earlier quoted context omitted.

According to Dan, you're both outliers: https://twitter.com/danluu/status/1058029337923014656 .

>"I'd never thought about it this way before (look at who gets rejected and see what they have in common), but I guess there's one thing interviews are pretty good at filtering for: people who are a certain type of nervous in interviews." Sounds about right. I can pass "take home quiz" style interviews at nearly 100%, but put me in front of a whiteboard and everything goes blank. Not sure why people insist on doing t…

Same experience here, I always chalked it up to anxiety. Tons of interviews, they generally love the hand-in stuff, but then whiteboarding kills me. Definitely jaded about it by now.

Re: Algorithms Interviews: Theory vs. Practice

#25
post #22
post #19

Opening statement: > When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down" In 20yeara I've never heard someone say anything like that.

If we are one query from bring down the site I don't want to be anywhere near that site.

After running postmortems at a couple of medium to large software enterprises for a while I'd say you'd likely find that it's a quite common although not everyday thing for a bad query to impact a significant number of users if not the whole site. I've seen this happen with people hand crafting queries, using ORMs, and with a NoSQL database (mongod). Most of the ones I remember were at least partly scale related. So maybe it doesn't happen so frequently if you don't have thousands of instances or more than hundreds of thousands to millions of users.

Re: Algorithms Interviews: Theory vs. Practice

#26

> Some companies will give very large out of band bonuses to people, but that work wasn't for a company that does a lot of that kind of thing, so there's nothing the company could do to indicate that it valued additional work once someone did "enough" work to get the best possible rating on a performance review. From a mechanism design point of view, the company was basically asking employees to stop working once the…

> Accepting that organizations are incentivized to extract the maximum amount of value from you means you should be: 1. Aware of the value you produce 2. Know how to sell it Do you think this is important even if one is already satisfied with one's compensation and mainly cares about the positive impact that they're making for end-users of the company's software?

You are donating a lot of money to your employer’s shareholders if you knowingly work for below market rates. I hope you have an excellent work environment but even if you do you should interview at least yearly to see if there’s anything really attractive around. Other companies have end users too.

Re: Algorithms Interviews: Theory vs. Practice

#28
post #19

Opening statement: > When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down" In 20yeara I've never heard someone say anything like that.

I've never heard anyone say that either, but it's not uncommon for O(n^2) algorithms to creep in and cause problems. Sometimes these issues don't actually "bring the site down", but still cause headaches. In my experience, I end up finding and fixing a problem like this about once per year on average, and I've been working as a software engineer for about 10 years.

Re: Algorithms Interviews: Theory vs. Practice

#29

I actually suspect that one of the main purposes of the algo based interview process is a motivation check. It takes time to prep for these interviews. Lots of time. So if you get a candidate that is crushing problems, it can either mean two things: 1) They are exceedingly brilliant and they can program decently 2) They have studied hard, they can reason and code decently Combine that with a system design portion and…

I've wonder if this + optimizing for sticky labor while meeting legal requirements. A person who has contributed to impressive open source ticks both checkboxes but will not pass FANG interview.

Re: Algorithms Interviews: Theory vs. Practice

#30

>"I’ve done maybe 40-ish "real" software interviews and passed maybe one or two of them" I'd say that about mirrors my experience as well. Is this really that common? Here I was thinking that I'm just an idiot.

I'm almost 50. I pass about two-thirds of all my on-site interviews, but have 100% failed my FNG interviews (I got an offer from Amazon 15 years ago but declined because I didn't want to move to Seattle). I've failed Google 4 times, Facebook 3 times, and Netflix twice. I think my biggest problem is because I'm so old, their expectations are even higher than what I realistically am. I'm okay being hired as a "senior software engineer" and working my way up, but they insist on interviewing me as a staff level, which I clearly am not capable of achieving. I'm confident that if I were to get in, I would perform in the top tier of engineers, but it's those damn algorithm questions I just can't get past.
Post reply on HN