Edit: I need to practice leetcode because the interview process for almost every software engineering role (especially in the Bay Area) seems to require going through at least one round of coding challenge based on leetcode medium/hard problem. I did not call it out earlier because I thought this is a very obvious point. Perhaps, I should have clarified that I am mostly targeting software engg roles.
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.
Isn't the prospect of upcoming technical interviews motivation enough?
I was recently chatting with the ChatGPT about it and it come up with a solid list:
#1, #3, #217, #347 - foundations
#33, #56, #76, #239 - efficiency patterns
#102, #104, #110, #200 - recursion + structure
#207, #133, #323 - graphs
#215, #23, #621, #146, #692 - heaps & scheduling
#295, #355, #460 - system simulation
What I - more or less - asked for:
"Would you say that being good at leetcode style problems is a crucial/important skill for a web software developer who wants to work on the most complex software? Why yes, why not? If so, give me a good LeetCode numbers to tackle for practice in this context"
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 ending decision this week! It’s infuriating.
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.
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.
It's hard to believe you can work dozens of those problems and not learn something. Think of it as leveling up your skills. In fact, I'm surprised somebody hasn't gamified LeetCode yet.
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.
If Leetcode is just a means to an end for you you're probably not going to have a good time.
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.
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.
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.
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.
> 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.
- 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.
Make it a daily habit. Keep tapping your network, and good luck!
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.
Is this a uniquely US thing ?
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.
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
Mix it up with some easy, medium, and hards.
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.
Talk about people grinding punch cards when calculators are about to wipe them out
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.
You don't have to do the leetcode there. Can sit there for the whole time staring at the wall if you like.
But if you're doing anything there, it's leetcode. Your brain is a pattern matcher. It doesn't like boredom. Thus you can train it, a bit like a dog.
You resent being a wage slave being forced to do this.
What can you as an individual do about this? As you already know the answer is nothing. Which further demotivates you.
The answer is to separate the concerns.
With regards to demotivation, resentment etc. - read some Noam Chomsky or Karl Marx or Bernie Sanders. Go to a few local Denocratic Socialists of America meetings and talk to the one or two people there who are not just the usual weirdos who show up at political events. If you want to hit back at companies forcing you to do this, and be able to stand proud and not be a wage slave slug doing unpaid grinding of Leetcode without a paycheck, this is the only way to hit back, if only in a small way. These things change collectively, not individually. You might feel better.
Then - suck it up and start grinding Leetcode. Think about how it's cool you just learned to implement Dijkstra's flag algorithm and the like.
Get back to interviewing. Consider a job away from the Bay Area.