Live data from Hacker News

Ask HN: What is the point of algorithm-heavy interviews?

news.ycombinator.com

41–50 of 104 posts

Re: Ask HN: What is the point of algorithm-heavy interviews?

#41

> Who really cares about algorithm on daily bases. I find that statement really depressing to be honest. Why would you be so happy to deprive yourself of a huge source of potentially useful information that is the foundation of our field that shouldn't take long to learn? Algorithm and data structure knowledge helps you write processor + memory efficient code that scales well, and stops you reinventing the wheel when…

This is like saying that a car mechanic needs to have a PhD in thermodynamics to work on internal combustion engines. 99.9% of coders just need to know what things in their chosen language(s) are performance sensitive and what aren't - very few actually need to know the exact reason why. And even fewer need to be able to improve on said algorithms. If something needs sorting, you call the sort function in the object.…

No, it's not.

You do not need to learn how to analyze algorithmic complexity from a theoretical point of view, which would be very math-heavy.

But a college/university-level mathematics / comp-sci course in algorithms & data structures, usually only a 3 credit, 200-level course, isn't really asking too much.

Then you'd know why your O(n^2) algorithm sucks on any dataset larger than a toy without having to be scolded.

There's 10,000 shades of gray between not knowing shit other than sort() and having a PhD. Use some common sense.

Re: Ask HN: What is the point of algorithm-heavy interviews?

#42
post #19

Earlier quoted context omitted.

The problem is that knowledge needed for exams is needed for exams only, and does not correlate with your overall expertise.

I can assure you algos and data structures are a big part of systems software. Without these it's impossible to write efficient and correct code. It is these fundamentals that have made me easily switch profiles from VR to Self Driving to Cloud.

I think it is often much better not to write them yourself, but rely on a battle tested implementation.

Of course we're not talking about left-pad here, but implementing your own Diffie Hellman key exchange from scratch is usually a very bad idea.

Re: Ask HN: What is the point of algorithm-heavy interviews?

#43
post #25

> Who really cares about algorithm on daily bases. I find that statement really depressing to be honest. Why would you be so happy to deprive yourself of a huge source of potentially useful information that is the foundation of our field that shouldn't take long to learn? Algorithm and data structure knowledge helps you write processor + memory efficient code that scales well, and stops you reinventing the wheel when…

> why do people make such a big deal about this? You're arguing a point they didn't make. The point they made is that most coders don't need to worry about algorithms on a daily basis, and that reflects poorly on them in interviews where they expect you to not-so-subtly fake your cleverness with "aha!" moments when you're being drilled on the fine details of complex algorithms that you maybe once needed to implement…

> On the rare occasion that these coders need to worry about algorithmic scaling, they will re-use an implementation from their fine standard library or adapt one from another source, without turning it into a brain exercise of reasoning about and building the whole algorithm on scratch on whiteboard while a bunch of strangers are sitting there judging you and prompting you to explain your thought process as you go).

> It's nothing to do with whether you have the fundamentals of basic algorithms down or whether you can select an appropriate algorithm for a real world problem.

I never said they should be able e.g. code the algorithm from scratch on a whiteboard.

I'm saying you should be able to explain the basic principles of e.g. an array, a linked list, a hash table and a binary tree, and where each would be appropriate to use.

If you don't know these basic principles, I find it very unlikely you would know how to select library components or adapt algorithms that scaled to modest datasets.

Re: Ask HN: What is the point of algorithm-heavy interviews?

#44
post #20

For me there are two reasons: (1) We want to hire people who are able to solve programming-related problems. Now how do you find out if a candidate can do this? Looking at their CV doesn't tell you much. You can build up a long impressive CV without being able to program. So it would be nice to see them solve a problem right here and now. Ideally, that would be a problem of the type you would often encounter in your…

I think you are mistaking a programming-related problem for a CS-related problem.

Re: Ask HN: What is the point of algorithm-heavy interviews?

#45

> Who really cares about algorithm on daily bases. I find that statement really depressing to be honest. Why would you be so happy to deprive yourself of a huge source of potentially useful information that is the foundation of our field that shouldn't take long to learn? Algorithm and data structure knowledge helps you write processor + memory efficient code that scales well, and stops you reinventing the wheel when…

This is like saying that a car mechanic needs to have a PhD in thermodynamics to work on internal combustion engines. 99.9% of coders just need to know what things in their chosen language(s) are performance sensitive and what aren't - very few actually need to know the exact reason why. And even fewer need to be able to improve on said algorithms. If something needs sorting, you call the sort function in the object.…

No, that is a bit extreme.

I would rather use a mechanic that has an underlying understanding of how a ICE works, rather than a tech that just plugs in a device and swaps parts.

I don’t need the mechanic to know how to fabricate an engine from scratch, but does have an understanding of what is under the hood.

Re: Ask HN: What is the point of algorithm-heavy interviews?

#46
post #7

To waste your time. > Who really cares about algorithm on daily bases. How often you solve algorithm-heavy tasks at work? Practically no one and practically never for the majority of developers. It's a trend started by Google, and since lots of startups don't bother thinking for themselves (and the interviewer wants to sound knowledgeable) some of them also ask these questions. Perhaps this type of interview is more…

I have a coworker at my job who specifically asks questions he finds through googling “google interview questions”.

Re: Ask HN: What is the point of algorithm-heavy interviews?

#47

> Who really cares about algorithm on daily bases. I find that statement really depressing to be honest. Why would you be so happy to deprive yourself of a huge source of potentially useful information that is the foundation of our field that shouldn't take long to learn? Algorithm and data structure knowledge helps you write processor + memory efficient code that scales well, and stops you reinventing the wheel when…

This is like saying that a car mechanic needs to have a PhD in thermodynamics to work on internal combustion engines. 99.9% of coders just need to know what things in their chosen language(s) are performance sensitive and what aren't - very few actually need to know the exact reason why. And even fewer need to be able to improve on said algorithms. If something needs sorting, you call the sort function in the object.…

It is far from saying that. At best it's more like saying a car mechanic should understand how a car works (e.g., how does an internal combustion engine work) even though most car mechanics spend 80% of their time changing oil, oil filters, and rotating tires. I think it is completely reasonable that a car mechanic should understand how a car works because without that knowledge how do they diagnose what is wrong?

My main issue with this topic is everyone seems to complain at the difficulty and ridiculousness of the process yet proposes no viable alternatives. No one likes the idea of take home projects/coding assignments. People write blog posts complaining that they shouldn't have to do side projects to give themselves a portfolio. So what is left? Just the resume? That doesn't seem fair to people coming out of school or career changers that have no experience - how do we evaluate them? We can't ask them anything related to CS.

Re: Ask HN: What is the point of algorithm-heavy interviews?

#48

I realized that everyone needs a base level of algorithms knowledge to write and design good software. Ideally it is pretty basic (leetcode easy), but the initial employees at FAANG companies decided to have a hazing ritual by creating increasingly complicated questions (e.g. leetcode hard) and it is exacerbated by a large number of kids from universities who mindlessly play this game. It spread to all other tech com…

The rules of the game seem to be well-known at this point.

If one desires a job at a FAANG, it is fairly clear what ‘skills’ are expected to be demo’ed during the interview process.

It is as flawed as the SAT for college admission, but again, the individual knows what to focus on to maximize a successful outcome.

Re: Ask HN: What is the point of algorithm-heavy interviews?

#49
post #24

I've interviewed a lot of candidates (~200), and my interview generally looks like: * I describe the problem * They ask questions to figure out parts I didn't specify (which lets me evaluate how they handle resolving ambiguity) * They propose a brute force solution, and I ask them how quickly it runs and how much space it needs (talking in big-O is a fast way for me to tell if they understand their solution) * They p…

Am I allowed to check stackoverflow during your interview process?

I agree that ability to look things up is a major skill, but testing it reliably is difficult since it's so high variance.

So, no, I don't let people use reference materials including stack overflow. But I'll answer questions, and not judge them harshly for things that would easily be looked up.

Re: Ask HN: What is the point of algorithm-heavy interviews?

#50
Most people care for algorithms in some capacity in their day jobs.

Some might be able to exclusively tackle tasks that don't require algorithmic knowledge, but this severely limits their options on what tasks they can pick up in a team.

I haven't worked with an incompetent developer that was an algorithm wiz. And I haven't encountered a developer who's skills I would envy that wouldn't have known a lot about algorithms.

Is using a whiteboard the best way to hire or even the best way to test these? I don't believe so.

But to go the extra step and claim just because perhaps in your line of work you don't use something daily it's useless? That's asinine. To make an obvious exaggeration: a pilot doesn't handle emergency landings on a daily basis, perhaps ever in their career, but if I was hiring a pilot to fly my plane you damn well know I'd try to find out whether that's a skill they possess.

Post reply on HN