HACKER Q&A
📣 CharlieDigital

Why is tech hiring so focused on leetcode?


Talked to a dev currently going through interviews. Apple, Meta, Google -- all leetcode interviews so he has invested his time optimizing solely for that.

Things that I find more interesting in a candidate:

  - Can structure modular code
  - Writes testable code; knows _how_ to test code
  - Clear communication
  - Good documentation
  - Can read, work around, and isolate janky code
  - Understands higher order concepts and structural organization of code (class and inheritance hierarchies in OOP for example; lambas and closures in FP)
  - Shows a sense of curiosity and eagerness to learn
I place much more value in a candidate that can write code that is well-structured and easy to maintain rather than one that has optimized for solving specific technical puzzles unless those specific algorithms are key to your business and a competitive advantage (versus just using a standard off-the-shelf implementation).

What's the appeal of leetcode interviews? If you or your team have used them as a primary filter, did it work out?


  👤 zeptonaut22 Accepted Answer ✓
For context, I'm a pre-seed startup CTO and ex Googler who's probably conducted 50-100 interviews.

In short, "it gives some signal, it's easy, it requires less infra, and it's common so people won't criticize you for it".

- It gives some signal: I can generally rule out people who are clearly unable to write basic code (loops, good variable names, not getting lost while retracing code). In my experience, this camp accounts for some 80%+ of the people coming in for interviews, even at Google.

- It's easy: the up-front costs of asking a Leetcode-type question are low. As an interviewer, I can prepare for such an interview well with 2-3 hours of question searching and an hour or so of doing the question myself. Contrast this with "closer to real" interview questions, where you may create an entire "fake project" for candidates to work in which may get leaked. It could easily take 10-20 hours to think of a "right size project" with natural extensions for candidates, which is an eternity as a hiring manager that's hiring because they're strapped for time

- It requires less infra: you don't need any sort of "shared environment to see and run code", timers to ensure that people don't spend too long on take home questions. All you need is a shared notepad or white board

- It's common so people won't criticize you for it: "Nobody ever got fired for choosing Microsoft". These types of things have a self-perpetuating nature where people cargo cult what works for large successful companies.

I don't at all endorse asking these types of interview questions and agree that there are better ones, but I do think it's important to acknowledge there are real reasons why they get asked.


👤 buscoquadnary
I've been working on a blog post about that subject but basically. The most important feature of code in general is maintainability, the problem is maintainability is something that can really only be measured over a long time frame.

The other challenge is that most jobs don't need you to be that great of a developer they need you to be a decent developer and then it wouldn't matter if your Donald Knuth or Donald Rumsfeld you can perform within expectations.

So there isn't an easy way to really determine whether or not some produces lasting good work in a reasonable way in an interview, and you don't really need rockstar so much as you need people that can perform the minimum.

So you get crazy ideas that certain companies use and can use because they are making money hand over fist,and everyone assumes since that company is making so much money and hire people like that, that must be why they are making so much money, so they copy it in a cargo cult management fashion.

And if you think the leetcode is bad it at least has a tangential relation to development. You should've seen things back in the MS years when you'd have people ask you with a straight face "how many ice cream shops are in San Francisco?" "How many marbles can I fit in a bus?" "How many fields could our team fertilize using only what is produced in staff meetings?"

Stuff like that is even more annoying.


👤 codefreeordie
I think that leetcode-style interviews probably used to be more useful/more predictive when they weren't super common. Also, if you're one of the most-desirable employers in the market [as Google was at the time it popularized this type of interview], nearly any aggressive interview strategy will be at least moderately effective, as the most dedicated candidates will invest lots of effort in preparation for your interview specifically, and if you reject tons of candidates that would have been effective, it costs you ~nothing, since, as a top target for candidates, you'd never run out of top talent to hire.

Google also had an initial product which was primarily based around having a really good algorithm. Actually, several of their top early internal products also were about solving difficult problems with interesting and novel algorithms -- which gave them a huge bias in terms of what they were seeking.

Of course, at Google's scale and popularity, books were literally published about their interviews and both how to pass them and how great they were -- so naturally others who either were or wanted to be top-of-market adopted similar strategies. Lots of top companies also had Ex-Googler founders or early hires, which helped perpetuate the familiar structures throughout the industry.

For myself, I really dislike leetcode-style interviews. I think there is some value in asking, say, two different leetcode easy problems to verify that the candidate can produce reasonable code samples, and that they can express their ideas in code (and hopefully, also, verbally either while they code or in response to probing questions from the interviewer).


👤 dev_0
The argument is if you can leetcode, you can learn everything that is in TS list