This isn't my experience, I've found that the number one reason for not doing well on leetcode problems is simply because the candidate hasn't practiced doing leetcode problems. I've known plenty good engineers who, when interviewing with LC style interviews for the first time, fail utterly. Then they realize they just need to practice and did better.
I've been in the industry for around 15 years now, my anecdotal observation is that the average quality of engineers is negatively correlated with the rise of leetcode. 10 years ago the strongest signal was a solid github profile with lots of relevant projects.
That's not to say leetcode is the cause of this decline. The cause is the flood of SWE being rushed into the career as fast as possible (this is why github is no longer a good signal, bootcamps started training their students to create meaningless GH projects just to attempt to create signal).
However I've also seen no indication that leetcode type challenges have any relationship to being a good engineer. I've worked at plenty of places that required pretty tricky leetcode style problems filled with very, very mediocre engineers. Leetcode has become a game that has little to nothing to do with real world programming, in the same way that speed-cubing (solving Rubik's cubes in record time) has absolutely nothing to do with the player's underlying understanding of group theory and combinatorics.
The old fashioned walk through and reason about non-trivial code someone has written is still an excellent method to see how a programmer thinks and if they can code.
Take homes can get a bit out of hand because candidates can choose to spend too much time (12 hours on something that "should" take 2 hours) out of desperation (or perhaps simply not having a life) if the primary criterion is the completeness of the solution. I think it works best if the solution or partial solution is used as something to have a conversation about in the next interview. For instance, the applicant can explain their lack of unit tests by providing their reasoning for relying more heavily or entirely on integration tests as the system relies too heavily on an external service.
For take-homes, I don't think the candidate spending 12 hours on something that should take 2 is necessarily a negative signal - but it's also something that should be considered. If the candidate spent 12 hours ensuring the solution was perfect, then it's probable that they are just thorough - which is a good thing more often than not. You do end up in a quirky situation of judging candidates by how much time they are willing to dedicate to your take-home interview though.
Anecdotally, for the few take-homes that I've done - I've always gone a bit overboard out of pride. Granted, this is also how I approach a lot of coding tasks.. so I guess you get what you test for?
The 12 hour vs 2 hour thing is to allow for a degree of normalization, similarly to how it's unclear about what's being considered when 1 applicant spends 3 hours on a LC medium and another spends 30 minutes. Spending an extreme amount of time on take-homes confounds simple pride with someone who's otherwise a bad fit skills-wise but can eventually make up for it with an input of time, something that might not be appreciated after an offer is accepted. Too often companies will refuse to speak further with candidates if even 1 out of 20 test scenarios are not covered just because someone else chose to spend their entire weekend on the problem -- they'll be the same ones complaining about a dev shortage, no doubt.
This goes back to the days where job ads would request N years of X experience. The big takeaway from the last ~10 years is that this type of requirement is unnecessary. As an engineer who knows the fundamentals, it's relatively straightforward to pick up a new tech stack.
I wouldn't want to pass on someone who spent the last 5 years working in C because we have a java stack.
The problem with this is that the company has no skin in the game. Sadly flakey companies and recruiters are prevalent enough that it's not at all uncommon for a company to ask you to complete their "take home" assignment and then never get back to you. I've had it happen enough that I would simply refuse this now. I think if a company wants you to spend 3-4 hours on their take home project they should pay you for that time.
A lot of LC tends to hit on "specialist in LC". We overweight this type of candidate in our interview processes, mainly as "specialist in LC" no longer translates to "highly interested in Comp Sci fundamentals" or "Algorithm expert" - many grind LC just to get a job and promptly forget the fundamentals.
A few interviews that I've seen gaining prominence.
- Code Review interviews. Give a sample code review, and have the candidate provide feedback. I'd love to see this extended with just having the candidate write code review comments in whatever code review tool the company uses - you could then discuss the code review afterwards. Clarify ahead of time the tool that will be used for code review.
- Debugging broken code. Let the candidate show off how they approach dealing with broken/buggy code, clarify ahead of time the language/environment for debugging.
- Build a service/program to a spec via take home. Does the candidate build the system properly? do they exceed expectations? skip requirements? test the code? work double time?
- Given a problem, build a working solution in your IDE of choice.
I'm not even convinced that 5 45 minute to 1 hour interview block is the right size. Why not do a 3 hour time block where the candidate has to build something, then review with them at the end? This is common in interviews with for MBA-type positions.