This. Do not try and do the problems from scratch. All you will end up doing is frustrating yourself for hours and taking far longer to get through the material than you need to. You wouldn't do this in any other field e.g you wouldn't jump into a Linear Algebra textbook with no prior experience and expect to be able to solve all of the problems without first reading the chapters. Don't expect to be able to do that with coding interview patterns either. I'd recommend NeetCode but there's also Algomonster as well.
That's a disingenuous take. It's extremely unlikely you'll get asked any of these specific questions, but very likely you'll be asked something in the general space.
Core knowledge extrapolates... to learn system design, one studies the design of "solved" systems, thus learning to solve for new design problems.
If a company is asking leetcode questions verbatim, they probably don't care so much about that part of the interview anyway
i have been a software engineer for 20 years and never had to implement any of this stuff myself in my career. the last time i did was in my master’s program in CS. in contrast i’ve had to implement custom memory allocators and many other non trivial algorithms which cannot be implemented in 10 minutes but take days to design and implement.
If learning how to solve problems by reading a book is "memorizing solutions by heart" then yes, that's how most people do things.
Look, as much as you might want to believe you (and everyone else in the industry) are geniuses, the fact is that we memorize a lot of stuff that were painstakingly invented or discovered by great minds in the past.
If that is "don't need any actual skill" according to your dictionary, then so be it.
Leetcode is not for engineering on the job though, it's purely a test for getting hired. You wouldn't expect lawyers to take an LSAT while on the job.
A lot of people, especially those who don't do Leetcode or work in a company that asks such questions, think Leetcode should somehow relate to the work and are annoyed, but it's just a test like any other.
To reword it, leetcode is a barrier to entry for newcomers. It's pure gatekeeping and it says as much when people think they have to 'grind' it to have any prospect of a job.
It teaches you absolutely nothing about the rest of the job, around comms and leadership, which most of the time are more important than your ability to solve puzzles.
It selects for people who want to get in and want to grind.
I think I disagree with this. I taught myself web dev mainly through Udemy courses and managed to land my first dev job through that. I've been working my way through Algomonster and Neetcode and, as someone with no formal education in computer science or programming, it's been filling in some gaps in my knowledge and I've mostly been enjoying the process. Some things I saw in the code base at my last job that I didn't comprehend fully at the time now make a lot more sense.
On the contrary, Leetcode is one of the most egalitarian ways there is for hiring applicants, because if you can pass the test, you're basically hired, at least at FAANG and adjacent. I'd hate to have employers show implicit bias through such saccharine distinctions as "personal fit."
I think you and the other person who replied to me were dismissing the value of soft skills and the other things you need to know as a software engineer that are adjacent to writing code.
To put it another way - do you have an opportunity in leetcode to say the value of solving a challenge isn’t worth the time invested?
Leetcode is the initial layer. Once you show that you can code (because many can bullshit their way through a non-technical interview, I've seen that first hand at other companies where the employee couldn't code themselves out of a wet paper bag), then you go to the later rounds to show your soft skills.
yeah, and the test is not relevant, so it should no longer be used, and instead people should be hired on past projects and skills, perhaps on a 2 week trial.
Sure, you can want that but if you want to win, you have to play the game that's there, not what you'd personally want. Of course, you can reject that game for a different one but then you lose out on its benefits, such as massively higher pay.
if you just need to apply standard patterns than you are not actually inventing but just doing code monkey stuff, and you can’t really call that engineering
I wouldn't call constantly inventing new technology the only thing that qualifies as "engineering". It's about solving the problem under the given constraints. Sometimes that means evaluating existing solutions and determining that the problem is not novel and can be solved either in whole or in part with off the shelf software or textbook algorithms.
The fact that this is the majority of business problems these days doesn't mean that no engineering is happening. IMO what actually is "not engineering" are the emotional, gut driven processes behind the software at some companies. No due diligence is done, requirements are scant, novelty frameworks are used, testing is a joke, etc. Anything resembling engineering is usually an accident in such places. I'm not saying process light environments are "not doing it right", I mean places that do nearly everything in an arbitrary, cargo-culted fashion.
Every professional discipline is typically preceded by years of study. Want to become a jazz musician? Great, first study recital of classical music for a couple years, then learn all there is to learn about scales, functional harmony, ...
You learn the basic patterns, then you refine and combine those over years. For an outsider, this then looks like magic / creativity.
What I'm seeing is that the gatekeeping mechanism artificially restricts qualified candidates from passing the interview tests and the reduced supply of employable candidates causes the compensation of companies practicing leetcode interviews to rise instead (and it makes you bitter because you think you're better than them).
I'm also seeing that given hiring leetcode-trained code monkeys seem to be working fine for the FAANG companies that practice it, perhaps they don't really need that many "real engineers" that can come up with creative solutions to problems. If that's the case they're just hiring the kind of people they actually need the most, and the accusation of "discrimination" doesn't really hold.
Anyway, what I originally objected to was your allegation that reading books and learning standard solutions don't allow one to acquire skills and your attitude that applying standard solutions is something beneath you. I totally understand what you're objecting to (I find leetcode style questions sub-optimal, and when I'm on the interviewer side I don't do it, and that's a competitive advantage for me when everyone else is competing sub-optimally), but unfortunately I am not quite sympathetic to somebody who thinks to familiarizing oneself with standard solutions is beneath them.
Generously assuming software engineering is engineering - so you think that mechanical engineers or civil engineers don't reuse solutions 99.99% of the time?
I’d agree with you if someone somehow managed to memorize all the problems line by line, but that isn’t the case.
You’ve memorized how to build an array in your language of choice. You’ve memorized the patterns that require an array. You might’ve also picked up some techniques for splicing it.
When I see a master working, be it in woodworking, art, or engineering, everything is second nature. Years of seeing what worked and what doesn’t and they make it look effortlessly — almost like they memorized it all.
By all means, if the problem can be easily solved by DFS, but you want to be creative, try something else. If it was really creative, the interviewers will be sure to talk you up and you’ll beat out the “code monkey” that used DFS. If you invented some new type of search, I’ll look out for your paper on it. If you found a new way to hire and cut candidates only leaving the creative geniuses, I’m all ears.
https://neetcode.io/
https://algo.monster/