Live data from Hacker News

In Defense of LeetCode Interviews

alexmolas.com

21–30 of 94 posts

Re: In Defense of LeetCode Interviews

#21

I have always seen LeetCode problems as effectively hazing rituals in a job interview setting. A high pressure interview situation simply won’t bring out peak problem-solving capabilities in many people. At best you get some superficial insight into someone’s problem solving methodology, but at worst you filter out otherwise excellent fits for not being able to solve an ultimately inconsequential problem under pressu…

I was looking at the Meta interview guide and it says:

> Let us know if you’ve seen the problem previously

and also:

> In your tech screen, you’ll be asked to solve two problems in roughly 35 minutes. Practice coding solutions to medium and hard problems in less than 15 minutes each to help you be ready for the constraints during the interview.

The only way I could solve two problems in 35 minutes is if I've seen them before or it is a variation of a problem I've seen before.

Re: In Defense of LeetCode Interviews

#22
Coding assessments are definitely valuable in general. What isn't valuable are the class leetcode problems, where you have to use a heap, or DP, or some random useless data structure to solve a problem in O(n) instead of O(n log n) time. How about instead of asking a simple problem that has an obscure solution, ask a complicated problem with an obvious solution, but one that tests their software engineering skills. Make them ask clarifying questions about which of the many edge cases they are expected to handle, and verify which can be ignored. Add additional requirements that make refactoring necessary. Add constraints about the environment and ask how the candidate would handle that.

Re: In Defense of LeetCode Interviews

#23
I have a couple great companies on my resume because I ground these leetcode questions, but now that I’ve been working and in industry for 14 years… I don’t have the time to do the grind unless I’m explicitly looking for a job. The DS&A skills are still there, I use them and I’m glad I have them, but when someone reaches out to me to join their startup out of the blue and then hits me with the leetcode hard question that I haven’t seen in 8 years… well I’ve not passed those interviews. Usually I don’t say “ok, I’ll study for 4 weeks before the rounds” so I go in cold.

I never give these type of questions in my interviews of senior/staff+, I build out topical problems for the space I’m actually hiring for, then simplify it down to the interesting bits. I give a ramp, a simple problem, a more complex tweak to the simple problem that needs an interesting data structure (maybe needs a heap or similar) and then another tweak that forces them to abandon that data structure and do something novel. You can also fail this and still get hired.

With junior engineers, I’m sorry but I need something that looks like leetcode so I know you put the work in, and I can’t ask the topical questions because they have no frame of reference. These questions are like the common denominator for someone with no real world skills. I need to see that you’re driven and self motivated enough to teach yourself this (probably useless, when is the last time you had to implement merge sort) skill.

I also don’t think there is a great alternative. I put an extraordinary amount of work into making my questions that aren’t Leetcode, when they leak I’m heartbroken. I don’t want to just let a fancy school be the decision point, so I need to find a fair way to test. Asking people to do 1-2 days work or pair program… it’s usually caused a lot of dropping out of the funnel. So I would love to hear alternatives that are working for others

Re: In Defense of LeetCode Interviews

#24
There are thousands, and I’m not exaggerating, literally thousands of leetcode problems.

A lot of them require you to make, what to me at least, is some non-obvious clever observation about the problem. Sure the problem is talking about a guy robbing houses, but if you stand on your head and squint just right you’ll realize this is actually a graph cycle detection problem and you should use Floyd’s algorithm to solve it.

Because there are thousands of these problems the amount of time it would take someone to become familiar with them is prohibitive. So you are at the mercy of the interviewer, have they picked a super clever one, are they going to be ok with removing duplicates from the answer by tossing stuff in a set or do they want you to pull some dynamic programming out of thin air.

It’s the part where you have to divine the trick under pressure that measures nothing of value. I’ve been a professional software engineer for 2 decades. I’ve had times when I’ve been trying to solve some very tricky problem and done research and thought thoughts and come up with pretty clever solutions, or at least I think they are clever. Not once have I had to do this under pressure in a 45 minute time box with someone looking over my shoulder.

That’s my objection to leetcode. Sure it’s great if a candidate can recognize that your riddle about topological map rain capture is actually just a restatement of Kolger’s postulate at first glance (a problem and postulate I’ve just made up because I’m not going to wade back into leetcode right now) but that’s an insane thing to optimize for.

The vast majority of the problems programmers solve are actually just mapping business domains into code. The most common problems that need solving is taking squishy, incomplete, and contradictory requirements from multiple stakeholders and figuring out what needs to get done. People in the real world are rarely rolling their own data structures, because the red black tree you slap together is going to be infinitely worse than the battle tested highly optimized one you can pull out of the standard library or off your package manager.

In my long career I’ve had a handful of occasions to actually build a data structure or solve a problem with some very clever algorithm. And in those cases you don’t really want people shooting from the hip anyways, you would want them to do research and see what prior art exists so they can discover something like Floyd’s algorithm for finding cycles in a unidirectional graph (ok this one is real).

It is not clear to me what exactly leetcode tests. My best guess would be your ability to take a disguised questions and convert it into a handful of problem shapes and solve those. But if you grade leetcode like the website does during an interview, expect to lose a lot of perfectly fine candidates along the way.

Re: In Defense of LeetCode Interviews

#25

I have always seen LeetCode problems as effectively hazing rituals in a job interview setting. A high pressure interview situation simply won’t bring out peak problem-solving capabilities in many people. At best you get some superficial insight into someone’s problem solving methodology, but at worst you filter out otherwise excellent fits for not being able to solve an ultimately inconsequential problem under pressu…

I was looking at the Meta interview guide and it says: > Let us know if you’ve seen the problem previously and also: > In your tech screen, you’ll be asked to solve two problems in roughly 35 minutes. Practice coding solutions to medium and hard problems in less than 15 minutes each to help you be ready for the constraints during the interview. The only way I could solve two problems in 35 minutes is if I've seen the…

> Let us know if you’ve seen the problem previously

Or just say “I’ve seen this one before” until they get to one you actually have seen before and ace it.

Leetcode is a joke. I’ve hired a dozen or so high quality candidates using a short 2-3 hour take-home. It shows us more than leetcode ever could. And sometimes people take it places I could have never imagined, these are people we move quickly on and they are the highest performers in the org.

Re: In Defense of LeetCode Interviews

#27

Earlier quoted context omitted.

I don't try to add any pressure, but going on call will require some resilience from each team member.

As long as you don’t wake me at 3AM to rotate a red-black tree, or find the median of two sorted arrays we should be good

Exactly this. As someone that’s served as an oncall engineer for years now, the skills you need to operate a cluster are completely different from the things leetcode tests for.

Re: In Defense of LeetCode Interviews

#28
post #6

Leetcode is just a proxy for an IQ test. That's it. If you can study up and do well on leetcode, then you're smart. People getting hung up on how realistic the questions are, or whether you ever need to implement X data structure are confused. Fact is that no job can give a reasonable test for how it is to work there short of working there. There's team dynamics, developer / project fit, etc etc. All you can ever do…

I don’t know that people generally have a problem with testing their knowledge, I think most people that hate on Leetcode (including myself) just don’t like to code in front of strangers in a timed setting like that.

I’ve never been good at tests in school. I probably averaged Cs on tests through college. Projects though? Aced them every time and sometimes got pulled aside and told I was highly exceeding the projects of others in the class. I just do well when I can think alone, or when I can actually work toward a solution with a coworker.

I’ve made the companies I work for millions of dollars. But put me in front of a white board and ask me an algorithm question? You’d think I was fresh out of CS101.

Re: In Defense of LeetCode Interviews

#29

I have always seen LeetCode problems as effectively hazing rituals in a job interview setting. A high pressure interview situation simply won’t bring out peak problem-solving capabilities in many people. At best you get some superficial insight into someone’s problem solving methodology, but at worst you filter out otherwise excellent fits for not being able to solve an ultimately inconsequential problem under pressu…

At a certain point companies prefer employees who can memorize lots of trivial information and perform at a high level while being constantly monitored for adequate performance. Leetcode pop quizzes are excellent tests for this within an hour: POSIWID.[0] Should you work at these companies? Is this kind of employee optimal for company performance at an any given company size? I don’t have these answers.

[0] https://en.wikipedia.org/wiki/The_purpose_of_a_system_is_wha...

Post reply on HN