You don't. You need to have a goal and clear understanding about why you are doing what you are doing. This is the same with pretty much all activities that require significant effort - motivation is a brief blip that eventually withers away once you start struggling. What you need is discipline, planning, and regular routine. Plan (allocate some time each day/week) and do this regularly. Can't take it anymore? Make a coffee, take a walk, rest for a little while, take a nap, whatever, and then try again. Motivation is not something that you should be constantly chasing in the first place.
Depression, lack of motivation, are functional. They kick in when you don't think your prospects are good, prompting you to step back and think. If you were sufficiently convinced grinding LeetCode was a good career move, you would be motivated. The fact that you're not suggests you should do some research rather than plowing ahead. What do employers really care about? What's the best way to convince them you've got it? Where do you fit in?
> If you were sufficiently convinced grinding LeetCode was a good career move, you would be motivated.
Motivation certainly doesn't work like that in my brain. Consistency in pursuing goals I know on paper are the right choice despite lack of motivation is the only way I've achieved anything.
If you can wed career goals with dopamine, that's wonderful! But I suspect you're extremely lucky.
It takes some competitiveness, and I'm not sure the level of neuroticism it brings (me) is worth it, but "Who are these assholes and what's so special about them" works for me most the time :D
Then there's "Oh jesus how terrifying and embarrassing would it be to not have a great answer" coupled with "The people I idolize the most work in theoretical CS".
Yep. This is the way. Even if you don't want to/are not able to have a daily routine and such, detaching as many activities as possible from volatile things like motivation,mood,etc is extremely useful. That is the most important part. Early on in life it is easy, since you have a clear set of objectively great things to do - do great in school, do great in exams, do great in college, get a great first job, don't screw up health in growing years. So you can force yourself to do those no matter what. Later on in life (post college) it gets harder, since you have to ensure you're not forcing yourself to do something counterproductive, especially in new fields like SWE, where there's no clear industry standard career path yet, or an industry standard anything really. Academia in contrast you can apply this strategy until a lot later.
Wanted to respond to a few comments about why motivation has been an issue for me up until this point.
It is an issue simply because leetcode grinding makes me feel like all my 10+ years of commitment to my previous employer (often foolishly at the expense of my personal well-being) and all the things I have contributed and picked up on the way mean nothing / nada / zilch to my future prospective employers. The whole prep process makes me feel like I need to start from scratch and nothing that I did in the past matters at all. I find this extremely frustrating.
You don’t. I have never grinded leet code and never will. I have personally ended interviews where they tried to get me to do these. Not worth my time.
Any company that wants me to regurgitate toy problems that don’t have any relevance to the role is not one Im willing to bother working for.
I fee like if you’re “grinding” the goal is to memorize the solutions, which is kinda defeating the purpose anyway.
For the sake of argument: What if they have multiple candidates and they want to know which ones can solve problems better with code instead of hiring by vibes.
The topic is leetcode. I've written code during interviews and in reasonable takehomes before. If your choice of candidate is boiling down to fizzbuzz I'm not interested.
I can respect that, you must have enough talent and experience to allow to pick and choose opportunities. The job market is rough these days and for most, they need to eat and pay bills.
Even so, why see which ones can solve problems that aren't the problems that the job actually calls for solving?
I mean, if you're Google, and a small improvement in algorithmic efficiency means needing a thousand less servers, yes, you want people who know that kind of stuff like the back of their hand. Most places aren't Google, though. Places that interview like Google that don't have Google-like problems have a mis-fit between their interview process and the roles they are interviewing for. So, places that aren't really on top of what they're doing as an organization.
Let's assume all the other candidates can get the job done, the problems that need solving can be solved by most competent programmers. They want to know if you can solve problems they haven't even thought of at that point. Salaried employment is not the same as a contract with specific scope of work.
In a world with both Google and AI, why does anyone expect you to memorize the solutions to problems, especially to problems that won't actually be the ones you need to solve on the job?
But I wonder if, in order to get a job with the "just say no" approach, you need to leave the Bay Area. I wonder if most places there are so into the "that's the way it's done" that they can't see the absurdity of it. Other places in the country don't seem to be as infatuated with leetcode. But if you're determined to stay there, then it may be a search to find someone who doesn't use that standard for interviewing.
So you have a choice. Would you rather grind leetcode, or would you rather grind the job search for a place that doesn't interview that way?
(I had decent success with Robert Half. They're a recruiter that actually has a clue about tech people. They can work with more senior people, which 10 years qualifies you as. I forget whether they were the ones that led to my most recent role, but I remember being impressed with them as headhunters. They may be worth a shot in your situation.)
Don't think of it as a grind! I play some Leetcode almost daily purely for my own enjoyment. The problems are actually pretty fun for the most part. They can force your mind to think of a problem in ways it isn't used to which is rewarding in and of itself. And looking at how others have solved the same problem afterwards can teach you all kinds of nifty tricks, especially in programming languages you're less familiar with!
If Leetcode is just a means to an end for you you're probably not going to have a good time.
I found Neetcode to be a very fun way to progress through them. It has a skill tree that makes your progress more visible and has great lessons too.
On the more abstract motivation side, despite the somewhat contrived nature of the challenges compared to day-to-day work I have treated it as a learning opportunity as there is genuinely some interesting stuff in there and there you never know when it might come in handy.
by far the best "trick" (such as it is) is to use study as a break from some other, worse drudgery. Productive procrastination.
You need your life to be so boring, and so full of non-intellectual chores that you long for an hour to look at code again.
This borders on facetious: but try becoming a manager, having kids, or becoming a hermit, I did all three and my side gigs / study was never better than during that time. I learned to just remove fun until the chores were fun. Like how carrots are actually really sweet tasting if you stop eating sugar.
One of the problems I experienced trying to hold motivation was a sense of futility. There really isn't a sense of progress if you're just aimlessly solving problems with some abstract notion of getting better. Instead what I found helped is trying to work towards some sort of goal, for me that goal was to improve my _approach_ to leetcode problems, not necessarily focus on how many I can solve.
Through this I found out that most leetcode-style problems fall into one of a number of solution 'buckets,' and the challenge shifted more into a problem classification task, rather than a coding task. I found my ability to do (a very few) hards unaided its own reward and motivation to continue! Up to a point of course, at some point it does just become repetitive again. This website helped a bunch:
Never learned anything through leetcode I couldn't have learned more in depth by my personal projects. Leetcode feels like some bullshit you talk about on LinkedIn in an LLM like voice, as is
> We all know skills in programming are important
>But it is not just writing code, but also solving problems quickly and with the right tools.
>Before doing leetcode, I didn't really know how to tackle the challenges I was presented at work. I would still perform, but not like I do now, being on the top 100 leaderboard
>also please please hire me please I am starving
Leetcode is pretentious bullshit for american HR departments.
For people with social or performance anxiety, it could be just the opposite. In fact, I'll wager that some people diving into an extensive study of leetcode problems are doing it to procrastinate attending actual technical interviews. ("I'm not quite ready yet, gotta make sure I don't blow any interviews.")
That's been me before. If you're wondering why people ghost at the technical when they seemed like great candidates: sometimes, at least, they like engineering because it's a discipline where they can get things "right" within some defined band / acceptable tolerance. In interview context, where there's somebody watching and judging, the degree of tolerance is unknown, and you know you won't be given time to choose the most correct approach regardless, and that solving the technical problem is just an indirect proxy for solving the "is this person a good social fit" problem (because you know you have the technical ability), all acts as anti-motivator for practicing for leetcode style interviews.
Its easier to say "I just didn't study and that's why I didn't get the job" than it is to say "even though I spent a bunch of time optimizing for this interview scenario and know I absolutely aced the technical interview, they still didn't like me."
Heck, I've been in interviews where I found the technical aspect a relatively easy bar to pass, and I blurted out something strange just to sabotage myself. If they can look past that and still see that I know what I'm doing and bring a lot to the table, I know they are people that I can do my best work with without needing to be constantly second guessing myself in conversation.
Some companies seem to forget that interviews go both ways, and that job candidates are screening for something different than what companies are screening for.
The fear of failure also comes from the concept of "cool-off". I recently failed a coding challenge in Zoox only to find out after the rejection that the cool-off period is 2 years!!
I would have never applied to Zoox had I known up-front that I'd have to wait for so long to interview with them again.
For me there are 2 components to staying motivated.
1. Measurable, manageable goals. Don't toil for hours on end. I set the goal of 1 hard, 2 medium or 3 easy problems a day. And if I get stuck I consult chatgpt study to help direct how I should think about a certain problem.
2. Make it competitive. At least for the actual leetcode site you see how your run time and memory consumption stacks up against other users. I try to be the best in one or both. This can also get at run time and space complexities. You can also see the solutions for the fastest run times which can teach you some lower level ideas for the language you are using. I learned about holey arrays in Javascript due to this and how certain conditionals are better optimized for v8.
I am indeed learning a lot more about Python through my leetcode exercises. E.g. (this might sound lame to many) but I had never used the defaultdict type or the @lru_cacbe decorator up until I started doing leetcode.
> especially knowing you are actually never going to work on such problems as part of an actual job
Actually, unwittingly, problem solving being a common organizational behavior, and most algorithms being a blueprint for optimal problem solving; maybe get curious and shed the incline that they are merely academic?
Anyways, I did this, myself recently. I picked up CLRS and read it, omitting or skimming the proofy sections, opting to focus on design and intuition, which is troublesome when they begin to overlap. I hope to revisit it. It's a nice space to be in, a blissful stroll through pedagogy, little history lessons, easy stuff.
As I progressed through the readings I worked a healthy number of problems. Lots of struggle and pain working exercises, opting to avoid hints or shortcuts and spend hours and hours to internalize. This part stings. No one likes to bathe in the lather of their own ignorance, but it can be done.
Based on my recent job search: Don't focus on grinding leetcode, it's not worth your time unless you're applying to Meta/Google/MSFT etc.
- give yourself a concrete algorithm practice goal, such as "get through Blind 75" (it's a list of 75 questions you can find online).
- practice using data structures and also implementing whatever your language doesn't provide
For context, I just spent most of the last two months doing a job search in the Bay Area. Did final round interviews at several companies ranging in size from a few people to a few thousand.
I encountered exactly 1 (one!) direct leetcode problem during my interviews.
When I was doing it, I enjoyed the challenge and learning how to get better at understanding, solving them myself, and seeing other's solutions. Trying to understand the clever algrithms was a funny challenge too. I set myself goals for how many I wanted to get through and put a certain amount of time in most days at it. It was pretty fun. When I interviewed the questions were much easier than leetcode, but similar process/understanding was useful, and I felt much more relaxed having prepared, which was highly useful!
Choose your battles wisely, I guess. Maybe putting energy into acquiring yet another differentiator (of especially doubtful longterm relevance) is just not worth it?
Only you can decide this. I'd be looking at options outside that fiendish bubble already.
Having basic algorithm skills is pretty useful in general, but going down the "leetcode grind" doesn't strike me as being worth the effort for the vast majority of software engineering jobs.
It wasn't snarky at all. You are being overly defensive for no reason.
I've never been asked to "grind" leetcode, I've never been asked a leetcode style question at any interview I've had (and I'm in my mid 40s). I've never had any feeling of needing to do leetcode, and as far as I know neither have my friends.
The reason I asked if it was mainly a US thing was because I assume (maybe wrongly) that the majority of HN users are in the US, and this leetcode thing pops up a lot.
Personally I don't think "grinding" is the right way. The key thing is to truly understand the data structures and algorithms you're working with. Just grinding away is kind of like solving hundreds of difficult integrals and partial differential equations, without really understanding the math 100%, but hoping that you'll meet on a similar problem one day.
So first step is to really understand the theory, if you're not completely confident, or feel that there are obvious blind spots / gaps.
Next up I find it easier to classy the problems by type. Truth is that most leetcode problems are variations of more general subclasses. You'll have the knapsack problems, and other types. Learn to identify these, and study the more generalized versions of these problems, before you start solving the more specific versions.
I'm not saying that grinding is useless, because it can help you on speed and increasing your chances in stumbling on a problem you've solved before. The truth is that there's also an element of speed / efficiency to the LC-style interviews. But I think any sort of grinding should come after all the other things I've mentioned.
Why you need motivation? If you don't find a job you're gonna get to the streets. If you want to work at a tech company, then solve leetcode questions. No motivation needed.
There is already something motivating which is working at a tech company. If you don't want to work at some other field and only at tech, then do what is required. Might be that he doesn't think ahead and see what he becomes if gets into tech again, which is the primary motivation.
If he isn't motivated already then there is something deeper.
I find motivation from the fact that it should result in a job I could enjoy. It's similar to studying for an exam at university. You will likely not need the knowledge after, but it unlocks the true goal you want (a degree)
A 1000 yes! I can't sleep deprive mgself any longer and ironically midnight-to-6am is when I seem to be able do most of my quality work (including grinding problem after problem from leetcode) only to feel like shit in the morning.
I feel this. The last time I was job hunting I started the leetcode grind doing the blind 75 list you can find online. Luckily for me my network came through with a job.
I’m currently employed but if I lost this job I don’t know if I could do it again. I have enough savings to make it to retirement if I cut back expenses. I’d hate to blow it all not working for several years though.
I’m really really not happy with the field now. The whole agile and seniors “leading” projects where we do literally everything is complete bullshit imo. Hey manager wtf are you doing? Hey product owner make one effing decision this week! It’s infuriating.
People jump through those hoops because the difference in pay is massive. You can practice leetcode for 2 months and land a job at Meta for a 7-figure salary or give up and work somewhere else where the total compensation is low six-figures.
Why do you want to jump through these ridiculous hoops to ruin your soul and mind by working a meaningless job under an incompetent manager in the first place?
Your motivation lies in the answer if you have any.
Money alone is not a motivating answer unfortunately, because our subconscious (soul if you will) truly does not care about money and wealth itself.
But unfortunately again it is the only real sustainable source of our motivation.
There are companies that do not do this shit or at least do very basic just to make sure you’re not a fake programmer. Why do you need motivation to learn leetcode simple? It’s mostly a very basic CS and something you should know already as a developer.
Leetcodes are fun! You should find pleasure in solving puzzles and figuring things out. Consider yourself lucky that the interview process contains a part that is basically a game that you can get good at by memorization.
I genuinely don't find it fun to solve puzzles unless they have an application/ end goal in mind. Tell me to find cycles in a graph as a puzzle and I'll roll my eyes. It's worse if you ask me to do a topological sort for detecting cycles using some named algorithm.
Ask me maybe to verify that a CI verification sequence is valid, I'll probably be interested.
I understand that leetcode problems can be abstractions of everyday problems you might deal with at work. But I find them too academic, robbing people of rich context of actual problems. They don't teach you about how to draw equivalences between actual problems and their models.
That's exactly why they don't make much sense as an interview process. You don't need to be thrilled by puzzles to be an effective developer. Also if you reach the goal of solving problems by memorization, I'd be more concerned about how you communicate about your ideas to others and write code that's understandable and maintainable.
I had a very little percentage of leetcode-like tests while my job search. And it's been long already. I do not motivate myself at all. I just hate it. These are absolutely irrelevant puzzles that I almost never face in real-life work.
I get this. I couldn't grind leetcode before the LLM AI era, now even more so. It always made me feel like I'm doing a junior's work.
I guess it comes down to the kinda work you want to be doing. I myself love building products and product features and I've never really needed any leetcode knowledge for that (I don't work on products with a massive user base). I suppose if I had a problem that required a specialised algo, I'd just consult a few AI tools.
AI should make people start really trying to build their own solopreneurships and start their own companies or band together in small teams and forget about jobs. It's not going to be the same again. But we're at an inflection point where we can make a difference as individuals.
I mean we all know those things are stupid and an employer who puts stock in them is defo not someone you'd wanna work for, cus they are building teams on stupid principles and clearly dont have a clue about making software.
I'd say spend your time building something you always wanted to. That will really show off your skills.
You've been downvoted, but this is exactly how I feel as well. There is an element of denial amongst the HN crowd, commonly saying stuff like "Well I tried Claude code and it produced garbage". Any task with a tight "write->test->repeat" loop is going to get AI-trained into oblivion, and we've only 4 years into this LLM disruption.
Personally, I'm training up on: infrastructure, systems administration, security and software-architecture - because these are harder to train on given a longer "write->test->repeat" cycle, although I'm not in denial that they too will be disrupted.
Writing code for any problem - especially Leet-code style problems - is going to be solved by AI eventually. Don't be left behind.
Pretty much. If all you do is prompt in Claude why the hell you need to memorize how to solve leetcode problems? And usually the companies that push hard for leetcode are the one who also force to use AI to code.
I feel like building your own projects(for potential commercial success or for just a practice) is better preparation for an interview.
Meta by the way is changing the interview process and it's not leetcode anymore but AI assisted problem solution.
Think of the most annoying × least intelligent person you've ever met. Imagine that they have become a multi-millionaire, and are standing over your shoulder, watching you do leetcode. Right as you want to give up, you tell them this, and they say to you, "Have fun staying poor."
That feeling right there? Channel that into Leetcode. Your fist is your keyboard, their face is a working solution.
Vindictive spite is a very powerful motivator, even when it originates from fictional situations. The trick is to channel it into productivity instead of negativity.
You don't. You need to have a goal and clear understanding about why you are doing what you are doing. This is the same with pretty much all activities that require significant effort - motivation is a brief blip that eventually withers away once you start struggling. What you need is discipline, planning, and regular routine. Plan (allocate some time each day/week) and do this regularly. Can't take it anymore? Make a coffee, take a walk, rest for a little while, take a nap, whatever, and then try again. Motivation is not something that you should be constantly chasing in the first place.
Depression, lack of motivation, are functional. They kick in when you don't think your prospects are good, prompting you to step back and think. If you were sufficiently convinced grinding LeetCode was a good career move, you would be motivated. The fact that you're not suggests you should do some research rather than plowing ahead. What do employers really care about? What's the best way to convince them you've got it? Where do you fit in?
> If you were sufficiently convinced grinding LeetCode was a good career move, you would be motivated.
Motivation certainly doesn't work like that in my brain. Consistency in pursuing goals I know on paper are the right choice despite lack of motivation is the only way I've achieved anything.
If you can wed career goals with dopamine, that's wonderful! But I suspect you're extremely lucky.
It takes some competitiveness, and I'm not sure the level of neuroticism it brings (me) is worth it, but "Who are these assholes and what's so special about them" works for me most the time :D
Then there's "Oh jesus how terrifying and embarrassing would it be to not have a great answer" coupled with "The people I idolize the most work in theoretical CS".
This doesn’t work in Silicon Valley. He has to do leetcode.
Yep. This is the way. Even if you don't want to/are not able to have a daily routine and such, detaching as many activities as possible from volatile things like motivation,mood,etc is extremely useful. That is the most important part. Early on in life it is easy, since you have a clear set of objectively great things to do - do great in school, do great in exams, do great in college, get a great first job, don't screw up health in growing years. So you can force yourself to do those no matter what. Later on in life (post college) it gets harder, since you have to ensure you're not forcing yourself to do something counterproductive, especially in new fields like SWE, where there's no clear industry standard career path yet, or an industry standard anything really. Academia in contrast you can apply this strategy until a lot later.
Wanted to respond to a few comments about why motivation has been an issue for me up until this point.
It is an issue simply because leetcode grinding makes me feel like all my 10+ years of commitment to my previous employer (often foolishly at the expense of my personal well-being) and all the things I have contributed and picked up on the way mean nothing / nada / zilch to my future prospective employers. The whole prep process makes me feel like I need to start from scratch and nothing that I did in the past matters at all. I find this extremely frustrating.
I understand your frustration.
You can't change the past, and you can't control how companies interview. Focus on what you can control.
You don’t. I have never grinded leet code and never will. I have personally ended interviews where they tried to get me to do these. Not worth my time.
Any company that wants me to regurgitate toy problems that don’t have any relevance to the role is not one Im willing to bother working for.
I fee like if you’re “grinding” the goal is to memorize the solutions, which is kinda defeating the purpose anyway.
For the sake of argument: What if they have multiple candidates and they want to know which ones can solve problems better with code instead of hiring by vibes.
The topic is leetcode. I've written code during interviews and in reasonable takehomes before. If your choice of candidate is boiling down to fizzbuzz I'm not interested.
I can respect that, you must have enough talent and experience to allow to pick and choose opportunities. The job market is rough these days and for most, they need to eat and pay bills.
Even so, why see which ones can solve problems that aren't the problems that the job actually calls for solving?
I mean, if you're Google, and a small improvement in algorithmic efficiency means needing a thousand less servers, yes, you want people who know that kind of stuff like the back of their hand. Most places aren't Google, though. Places that interview like Google that don't have Google-like problems have a mis-fit between their interview process and the roles they are interviewing for. So, places that aren't really on top of what they're doing as an organization.
Let's assume all the other candidates can get the job done, the problems that need solving can be solved by most competent programmers. They want to know if you can solve problems they haven't even thought of at that point. Salaried employment is not the same as a contract with specific scope of work.
This. Seriously.
In a world with both Google and AI, why does anyone expect you to memorize the solutions to problems, especially to problems that won't actually be the ones you need to solve on the job?
But I wonder if, in order to get a job with the "just say no" approach, you need to leave the Bay Area. I wonder if most places there are so into the "that's the way it's done" that they can't see the absurdity of it. Other places in the country don't seem to be as infatuated with leetcode. But if you're determined to stay there, then it may be a search to find someone who doesn't use that standard for interviewing.
So you have a choice. Would you rather grind leetcode, or would you rather grind the job search for a place that doesn't interview that way?
(I had decent success with Robert Half. They're a recruiter that actually has a clue about tech people. They can work with more senior people, which 10 years qualifies you as. I forget whether they were the ones that led to my most recent role, but I remember being impressed with them as headhunters. They may be worth a shot in your situation.)
Don't think of it as a grind! I play some Leetcode almost daily purely for my own enjoyment. The problems are actually pretty fun for the most part. They can force your mind to think of a problem in ways it isn't used to which is rewarding in and of itself. And looking at how others have solved the same problem afterwards can teach you all kinds of nifty tricks, especially in programming languages you're less familiar with!
If Leetcode is just a means to an end for you you're probably not going to have a good time.
I found Neetcode to be a very fun way to progress through them. It has a skill tree that makes your progress more visible and has great lessons too.
On the more abstract motivation side, despite the somewhat contrived nature of the challenges compared to day-to-day work I have treated it as a learning opportunity as there is genuinely some interesting stuff in there and there you never know when it might come in handy.
by far the best "trick" (such as it is) is to use study as a break from some other, worse drudgery. Productive procrastination.
You need your life to be so boring, and so full of non-intellectual chores that you long for an hour to look at code again.
This borders on facetious: but try becoming a manager, having kids, or becoming a hermit, I did all three and my side gigs / study was never better than during that time. I learned to just remove fun until the chores were fun. Like how carrots are actually really sweet tasting if you stop eating sugar.
One of the problems I experienced trying to hold motivation was a sense of futility. There really isn't a sense of progress if you're just aimlessly solving problems with some abstract notion of getting better. Instead what I found helped is trying to work towards some sort of goal, for me that goal was to improve my _approach_ to leetcode problems, not necessarily focus on how many I can solve. Through this I found out that most leetcode-style problems fall into one of a number of solution 'buckets,' and the challenge shifted more into a problem classification task, rather than a coding task. I found my ability to do (a very few) hards unaided its own reward and motivation to continue! Up to a point of course, at some point it does just become repetitive again. This website helped a bunch:
https://blog.algomaster.io/p/15-leetcode-patterns
Never learned anything through leetcode I couldn't have learned more in depth by my personal projects. Leetcode feels like some bullshit you talk about on LinkedIn in an LLM like voice, as is
> We all know skills in programming are important
>But it is not just writing code, but also solving problems quickly and with the right tools.
>Before doing leetcode, I didn't really know how to tackle the challenges I was presented at work. I would still perform, but not like I do now, being on the top 100 leaderboard
>also please please hire me please I am starving
Leetcode is pretentious bullshit for american HR departments.
> How does one stay motivated to grind through LeetCode?
Isn't the prospect of upcoming technical interviews motivation enough?
For people with social or performance anxiety, it could be just the opposite. In fact, I'll wager that some people diving into an extensive study of leetcode problems are doing it to procrastinate attending actual technical interviews. ("I'm not quite ready yet, gotta make sure I don't blow any interviews.")
That's been me before. If you're wondering why people ghost at the technical when they seemed like great candidates: sometimes, at least, they like engineering because it's a discipline where they can get things "right" within some defined band / acceptable tolerance. In interview context, where there's somebody watching and judging, the degree of tolerance is unknown, and you know you won't be given time to choose the most correct approach regardless, and that solving the technical problem is just an indirect proxy for solving the "is this person a good social fit" problem (because you know you have the technical ability), all acts as anti-motivator for practicing for leetcode style interviews.
Its easier to say "I just didn't study and that's why I didn't get the job" than it is to say "even though I spent a bunch of time optimizing for this interview scenario and know I absolutely aced the technical interview, they still didn't like me."
Heck, I've been in interviews where I found the technical aspect a relatively easy bar to pass, and I blurted out something strange just to sabotage myself. If they can look past that and still see that I know what I'm doing and bring a lot to the table, I know they are people that I can do my best work with without needing to be constantly second guessing myself in conversation.
Some companies seem to forget that interviews go both ways, and that job candidates are screening for something different than what companies are screening for.
The fear of failure also comes from the concept of "cool-off". I recently failed a coding challenge in Zoox only to find out after the rejection that the cool-off period is 2 years!!
I would have never applied to Zoox had I known up-front that I'd have to wait for so long to interview with them again.
For me there are 2 components to staying motivated.
1. Measurable, manageable goals. Don't toil for hours on end. I set the goal of 1 hard, 2 medium or 3 easy problems a day. And if I get stuck I consult chatgpt study to help direct how I should think about a certain problem.
2. Make it competitive. At least for the actual leetcode site you see how your run time and memory consumption stacks up against other users. I try to be the best in one or both. This can also get at run time and space complexities. You can also see the solutions for the fastest run times which can teach you some lower level ideas for the language you are using. I learned about holey arrays in Javascript due to this and how certain conditionals are better optimized for v8.
I am indeed learning a lot more about Python through my leetcode exercises. E.g. (this might sound lame to many) but I had never used the defaultdict type or the @lru_cacbe decorator up until I started doing leetcode.
> especially knowing you are actually never going to work on such problems as part of an actual job
Actually, unwittingly, problem solving being a common organizational behavior, and most algorithms being a blueprint for optimal problem solving; maybe get curious and shed the incline that they are merely academic?
Anyways, I did this, myself recently. I picked up CLRS and read it, omitting or skimming the proofy sections, opting to focus on design and intuition, which is troublesome when they begin to overlap. I hope to revisit it. It's a nice space to be in, a blissful stroll through pedagogy, little history lessons, easy stuff.
As I progressed through the readings I worked a healthy number of problems. Lots of struggle and pain working exercises, opting to avoid hints or shortcuts and spend hours and hours to internalize. This part stings. No one likes to bathe in the lather of their own ignorance, but it can be done.
Based on my recent job search: Don't focus on grinding leetcode, it's not worth your time unless you're applying to Meta/Google/MSFT etc.
- give yourself a concrete algorithm practice goal, such as "get through Blind 75" (it's a list of 75 questions you can find online).
- practice using data structures and also implementing whatever your language doesn't provide
For context, I just spent most of the last two months doing a job search in the Bay Area. Did final round interviews at several companies ranging in size from a few people to a few thousand.
I encountered exactly 1 (one!) direct leetcode problem during my interviews.
When I was doing it, I enjoyed the challenge and learning how to get better at understanding, solving them myself, and seeing other's solutions. Trying to understand the clever algrithms was a funny challenge too. I set myself goals for how many I wanted to get through and put a certain amount of time in most days at it. It was pretty fun. When I interviewed the questions were much easier than leetcode, but similar process/understanding was useful, and I felt much more relaxed having prepared, which was highly useful!
Choose your battles wisely, I guess. Maybe putting energy into acquiring yet another differentiator (of especially doubtful longterm relevance) is just not worth it?
Only you can decide this. I'd be looking at options outside that fiendish bubble already.
Man, I've probably spent a combined 2 hours over my entire life on leetcode... And that was mostly just curiosity.
Is this a uniquely US thing ?
> Is this a uniquely US thing ?
It's probably a big corpo thing.
Having basic algorithm skills is pretty useful in general, but going down the "leetcode grind" doesn't strike me as being worth the effort for the vast majority of software engineering jobs.
Your phrasing lines up with snarky "Why can't <nationality> do <alternative>?" with no substantive argument.
If serious, it was and still is a common screening tool for big tech and many other shops around the world.
It wasn't snarky at all. You are being overly defensive for no reason.
I've never been asked to "grind" leetcode, I've never been asked a leetcode style question at any interview I've had (and I'm in my mid 40s). I've never had any feeling of needing to do leetcode, and as far as I know neither have my friends.
The reason I asked if it was mainly a US thing was because I assume (maybe wrongly) that the majority of HN users are in the US, and this leetcode thing pops up a lot.
OP expressly said "big tech," which isn't US exclusive.
> I've never been asked a leetcode style question at any interview I've had (and I'm in my mid 40s).
For this anecdote to be relevant, you'd need to have datapoints from "big tech" qualifying jobs.
Glossing over this qualifier pattern matches with snarky comments.
Have you looked into competitive programming? It's basically the same thing but a hundred times more fun.
Personally I don't think "grinding" is the right way. The key thing is to truly understand the data structures and algorithms you're working with. Just grinding away is kind of like solving hundreds of difficult integrals and partial differential equations, without really understanding the math 100%, but hoping that you'll meet on a similar problem one day.
So first step is to really understand the theory, if you're not completely confident, or feel that there are obvious blind spots / gaps.
Next up I find it easier to classy the problems by type. Truth is that most leetcode problems are variations of more general subclasses. You'll have the knapsack problems, and other types. Learn to identify these, and study the more generalized versions of these problems, before you start solving the more specific versions.
I'm not saying that grinding is useless, because it can help you on speed and increasing your chances in stumbling on a problem you've solved before. The truth is that there's also an element of speed / efficiency to the LC-style interviews. But I think any sort of grinding should come after all the other things I've mentioned.
Discussing the theoretical aspects of each problem with an LLM can also be helpful or at least give some inspiration. Usually.
Why you need motivation? If you don't find a job you're gonna get to the streets. If you want to work at a tech company, then solve leetcode questions. No motivation needed.
I can't tell if you're being serious or not. "If you want to work at X, solve Y" is a textbook example of extrinsic motivation.
There is already something motivating which is working at a tech company. If you don't want to work at some other field and only at tech, then do what is required. Might be that he doesn't think ahead and see what he becomes if gets into tech again, which is the primary motivation.
If he isn't motivated already then there is something deeper.
Just break it down into 15 minute chunks. Do one session in the morning. One at night or in the evening.
Make it a daily habit. Keep tapping your network, and good luck!
I find motivation from the fact that it should result in a job I could enjoy. It's similar to studying for an exam at university. You will likely not need the knowledge after, but it unlocks the true goal you want (a degree)
I'd like an answer about how one grinds through anything. As I get closer to retirement, it becomes harder.
A 1000 yes! I can't sleep deprive mgself any longer and ironically midnight-to-6am is when I seem to be able do most of my quality work (including grinding problem after problem from leetcode) only to feel like shit in the morning.
I feel this. The last time I was job hunting I started the leetcode grind doing the blind 75 list you can find online. Luckily for me my network came through with a job.
I’m currently employed but if I lost this job I don’t know if I could do it again. I have enough savings to make it to retirement if I cut back expenses. I’d hate to blow it all not working for several years though.
I’m really really not happy with the field now. The whole agile and seniors “leading” projects where we do literally everything is complete bullshit imo. Hey manager wtf are you doing? Hey product owner make one effing decision this week! It’s infuriating.
Good lord based on these comments I am so glad to not live in the same bubble y’all seem to be in.
13 years as a dev, many jobs, countless interviews, and I have never once solved, been asked to solve, or even attempted to solve a leetcode problem.
Reading people talking about what they do here it sounds like voluntary torture. I would quit being a dev if that’s what it took.
OP: I’m saying maybe you don’t have to join them. Get out of the mindset. Find jobs that value your time.
People jump through those hoops because the difference in pay is massive. You can practice leetcode for 2 months and land a job at Meta for a 7-figure salary or give up and work somewhere else where the total compensation is low six-figures.
Maybe combine it with learning that language you wish to?
Why do you want to jump through these ridiculous hoops to ruin your soul and mind by working a meaningless job under an incompetent manager in the first place?
Your motivation lies in the answer if you have any.
Money alone is not a motivating answer unfortunately, because our subconscious (soul if you will) truly does not care about money and wealth itself.
But unfortunately again it is the only real sustainable source of our motivation.
There are companies that do not do this shit or at least do very basic just to make sure you’re not a fake programmer. Why do you need motivation to learn leetcode simple? It’s mostly a very basic CS and something you should know already as a developer.
Leetcodes are fun! You should find pleasure in solving puzzles and figuring things out. Consider yourself lucky that the interview process contains a part that is basically a game that you can get good at by memorization.
I hope you meant it sarcastically.
I genuinely don't find it fun to solve puzzles unless they have an application/ end goal in mind. Tell me to find cycles in a graph as a puzzle and I'll roll my eyes. It's worse if you ask me to do a topological sort for detecting cycles using some named algorithm.
Ask me maybe to verify that a CI verification sequence is valid, I'll probably be interested.
I understand that leetcode problems can be abstractions of everyday problems you might deal with at work. But I find them too academic, robbing people of rich context of actual problems. They don't teach you about how to draw equivalences between actual problems and their models.
They are fun if you're into competitive programming.
But most people aren't, not even developers, so they probably take people straight back to school days and anxiety inducing exams.
That's exactly why they don't make much sense as an interview process. You don't need to be thrilled by puzzles to be an effective developer. Also if you reach the goal of solving problems by memorization, I'd be more concerned about how you communicate about your ideas to others and write code that's understandable and maintainable.
I had a very little percentage of leetcode-like tests while my job search. And it's been long already. I do not motivate myself at all. I just hate it. These are absolutely irrelevant puzzles that I almost never face in real-life work.
I get this. I couldn't grind leetcode before the LLM AI era, now even more so. It always made me feel like I'm doing a junior's work.
I guess it comes down to the kinda work you want to be doing. I myself love building products and product features and I've never really needed any leetcode knowledge for that (I don't work on products with a massive user base). I suppose if I had a problem that required a specialised algo, I'd just consult a few AI tools.
Good luck finding that motivation though.
When I went through the grind, I just would open up levels.fyi and check the salaries whenever I felt like giving up.
Now that I have a wife and kid, its very easy to find motivation to do things I don't want to do to provide for my family :P
AI should make people start really trying to build their own solopreneurships and start their own companies or band together in small teams and forget about jobs. It's not going to be the same again. But we're at an inflection point where we can make a difference as individuals.
I started to enjoy it after I started getting better at it.
Mix it up with some easy, medium, and hards.
If u dont wanna do it, then why are you doing it?
I mean we all know those things are stupid and an employer who puts stock in them is defo not someone you'd wanna work for, cus they are building teams on stupid principles and clearly dont have a clue about making software.
I'd say spend your time building something you always wanted to. That will really show off your skills.
AI is about to kill software jobs, and ppl are grinding leetcode
Talk about people grinding punch cards when calculators are about to wipe them out
You've been downvoted, but this is exactly how I feel as well. There is an element of denial amongst the HN crowd, commonly saying stuff like "Well I tried Claude code and it produced garbage". Any task with a tight "write->test->repeat" loop is going to get AI-trained into oblivion, and we've only 4 years into this LLM disruption.
Personally, I'm training up on: infrastructure, systems administration, security and software-architecture - because these are harder to train on given a longer "write->test->repeat" cycle, although I'm not in denial that they too will be disrupted.
Writing code for any problem - especially Leet-code style problems - is going to be solved by AI eventually. Don't be left behind.
I’m sure there are a few CEO’s that think that a fleet of LLM’s will replace their engineers. Those CEO’s are in for an extremely rude awakening lol.
Pretty much. If all you do is prompt in Claude why the hell you need to memorize how to solve leetcode problems? And usually the companies that push hard for leetcode are the one who also force to use AI to code. I feel like building your own projects(for potential commercial success or for just a practice) is better preparation for an interview.
Meta by the way is changing the interview process and it's not leetcode anymore but AI assisted problem solution.
Think of the most annoying × least intelligent person you've ever met. Imagine that they have become a multi-millionaire, and are standing over your shoulder, watching you do leetcode. Right as you want to give up, you tell them this, and they say to you, "Have fun staying poor."
That feeling right there? Channel that into Leetcode. Your fist is your keyboard, their face is a working solution.
Vindictive spite is a very powerful motivator, even when it originates from fictional situations. The trick is to channel it into productivity instead of negativity.
Don't do it if you don't want to do it but also accept the consequences of this decision.