53 comments

  • ZpJuUuNaQ5 an hour ago

    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.

    • Jeff_Brown an hour ago

      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?

      • MangoToupe an hour ago

        > 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.

        • jvanderbot 43 minutes ago

          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".

    • porridgeraisin 25 minutes ago

      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.

  • blutoot an hour ago

    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.

  • andriamanitra 44 minutes ago

    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.

  • OisinMoran an hour ago

    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.

  • theoldgreybeard 40 minutes ago

    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.

    • notepad0x90 9 minutes ago

      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.

  • jvanderbot 41 minutes ago

    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.

  • nickstaggs 25 minutes ago

    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.

    • blutoot 20 minutes ago

      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.

  • wesrobin an hour ago

    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

  • keepamovin 36 minutes ago

    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!

  • azangru an hour ago

    > How does one stay motivated to grind through LeetCode?

    Isn't the prospect of upcoming technical interviews motivation enough?

    • a4isms 41 minutes ago

      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.")

      • IggleSniggle 14 minutes ago

        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.

      • blutoot 7 minutes ago

        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.

  • fleshmonad 41 minutes ago

    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.

  • iansinnott an hour ago

    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.

  • meltyness an hour ago

    > 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.

  • SirFatty 18 minutes ago

    I'd like an answer about how one grinds through anything. As I get closer to retirement, it becomes harder.

    • blutoot 4 minutes ago

      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.

  • LandR an hour ago

    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 ?

    • elric 28 minutes ago

      > 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.

    • caminante 38 minutes ago

      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.

      • LandR 31 minutes ago

        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.

  • TrackerFF 40 minutes ago

    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.

    • HPsquared 38 minutes ago

      Discussing the theoretical aspects of each problem with an LLM can also be helpful or at least give some inspiration. Usually.

  • kilroy123 34 minutes ago

    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!

  • andai an hour ago

    Have you looked into competitive programming? It's basically the same thing but a hundred times more fun.

  • worldsavior an hour ago

    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.

    • elric 26 minutes ago

      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.

  • buggy6257 35 minutes ago

    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.

  • stitch4143 2 hours ago

    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)

  • mamcx an hour ago

    Maybe combine it with learning that language you wish to?

  • le-mark an hour ago

    I feel this. The last time I was job hunting I started the leetcode grind doing the 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.

  • loeber an hour ago

    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.

    • InfinityByTen 31 minutes ago

      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.

      • TrackerFF 21 minutes ago

        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.

  • jameshush 32 minutes ago

    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

  • rckt an hour ago

    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.

  • mmkos 2 hours ago

    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.

  • johnwheeler an hour ago

    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.

  • the_real_cher an hour ago

    I started to enjoy it after I started getting better at it.

    Mix it up with some easy, medium, and hards.

  • everyone 2 hours ago

    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.

  • anonym29 42 minutes ago

    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.

  • diamondfist25 an hour ago

    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

    • Flere-Imsaho an hour ago

      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.

    • oompydoompy74 an hour ago

      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.

    • myth_drannon 44 minutes ago

      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.

  • kotsmanis 2 hours ago

    Don't do it if you don't want to do it but also accept the consequences of this decision.