Yeah I'm still doing LeetCode, and this post will be updated with all new tricks that I know.
What's up everybody
Have you done any LeetCode this week? If not, I'm hoping that by the end of this post you'll want to jump straight into a problem.
LeetCode is infamous. Pretty much everyone who starts learning DSA is scared of it, even people who've never touched a data structure or algorithm in their life.
Same for me.
I used to have a mentor who was guiding me on how to realistically land a dev job. Before he could even get a word in, I warned him three times:
I have never done any LeetCode or DSA before.
Those days were BADDDD. But slowly things changed, from BADDD to baddd, to bad, to "not great," to "fine", to "oh wait, I think I actually get something now."
Let me be straightforward:
We only start to like something once we know how it works.
What do I mean by that?
I mean you'll never enjoy LeetCode if you keep solving problems blindly. You open a question, try to figure out what it's asking, then spend minutes (or hours) convincing yourself that if you just keep staring at the screen, the right approach will eventually pop into your head.
Nope. That's not how it works.
LeetCode isn't something you can brute-force with willpower. The only way through is taking the time to actually understand it.
Okay, enough yapping. Welcome to Finding the Beauty of LeetCode 101.
1. LeetCode problems have patterns
I know you already know this, but I'm saying it again because it's the most obvious thing and people still ignore it.
Once you've solved enough problems, you start noticing:
Tons of them are worded differently but share the same pattern, the same data structure, the same algorithm, and almost the same solution.
Turns out LeetCode isn't that "creative" after all.
So how many problems is "enough" before you start recognising patterns?
It depends on you and how consistent you are, but my recommendation is to follow along with videos where people solve the most iconic, interview-focused questions.
Somewhere around halfway through (these videos are usually hours long), you'll notice something clicking. That's your intuition starting to kick in.
2. The Big-O Pattern cheat sheet
This is honestly one of the most impressive things I've ever come across.
Huge shout out to Bitflip, who made a cheat sheet that helps you narrow down the pattern in under ONE minute, just by looking at the input size constraint.
Just figuring out the minimum time complexity your solution needs already does you a massive favour, because it rules out a bunch of patterns straight away.
This is my FAVOURITE trick ngl.
3. Normalise admitting you can't solve it
That was me a few months ago, sitting there for hours because I was sure my naive brain would crack it eventually.
Back then, solving four questions in a day felt like a huge win, when realistically, four questions should take two hours max.
The problem is we think we'll figure it out, and then the solution turns out to use something we've never even heard of.
LeetCode is ruthless about failing your solution for all sorts of reasons: time complexity not good enough, hidden edge cases you never thought of, or your code runs but it's not the approach the problem is looking for.
Knowing all of that just takes experience.
Pro tip: Give it a real go for the first 15 minutes. If you're still stuck, look at hints for another 10 to 15 minutes. After that, read the full solution.
I did this while rushing to prep for an interview, and it worked really well.
Just because something kinda makes sense in your head doesn't mean it's actually correct.
4. Consistency (and a little bit of fun)
Super cliché, I know, but sadly it works every single time.
Where I used to live, TikTok streaks were so common they were basically a must-have in most relationships.
If you haven't seen it, it's a little fire icon that counts how many days in a row two people have messaged each other. Both of you have to interact within 24 hours, otherwise it resets to zero.
That's honestly how a lot of friendships die.
LeetCode has the same streak thing, and it might be one of their smartest moves.
Yes, I definitely do LeetCode everyday if you promise me this after a year
Sometimes people solve problems not because they want to practise, but because they don't want to lose their streak, and that ends up making them practise anyway. Wow.
So if you can stay consistent for a few days, you'll want to keep that streak going. You'll even go to bed feeling like your day isn't complete if you haven't solved anything. And voilà, LeetCode just got another person hooked. Honestly though, it's a win-win after all.
5. Brute force first, optimise later
A lot of people chase the optimal Big-O straight away and forget the most important thing: getting a solution that actually works, even if it's brute force.
Never forget the #1 rule of developers:
If it runs, don't touch it.
Yeah, I know, DSA cares about more than that. But a win is a win, and starting with something that works makes the whole problem way less scary.
Pro tip: Go with whatever solution comes to mind first. If it's clearly brute force and you know there's a better way, write the brute force anyway, then work on improving it. Not sure if it can be optimised? Check the input constraints against the Big-O cheat sheet from earlier, or ask your AI agent whether there's a better time complexity. If the answer is yes, keep going.
Before you can optimise anything, you've got to make it work first.
6. Keep an error log
You'd be surprised how much longer you remember things when you write them down.
Maybe not forever, but definitely longer than just assuming you'll remember.
I keep an error log for every question I solve:
- What pattern was it?
- How long did it take me before I gave up?
- Where did I get stuck?
- What did I assume?
- What was wrong, and what was right?
When I look back at it, the memory of struggling through each problem comes flooding back. I might not remember the exact solution, but I remember my process and which approach made more sense. That's a great starting point.
7. Re-solve old problems
I don't think this one needs much explaining, so I'll keep it short and leave the rest to your own self-reflection.
Ask yourself this:
Wouldn't it feel annoying and unsettling to keep grinding new questions while secretly wondering if you could still solve the old ones?
It would for me. So I re-solve them.
Honestly, if you can't re-solve a question, it doesn't count.
8. Read the discussion
I bet a lot of people care so much about getting the green "Accepted" that they skip the process completely. But the process matters way more than you'd think.
Reading the discussion shows you how other people actually came up with their approaches:
- What sparked the idea in their head?
- Which detail put them on the right track?
- Any personal tips or tricks?
A lot of these people will never be YouTubers, but they've got the kind of experience and tips you'd happily click on a video to watch.
Plus, people complain in the discussion too. Sometimes I go there just for a bit of emotional support...
9. Never leave a question half-understood
Say you couldn't solve a problem, so you check the solution. You copy it into your notes, and it kinda makes sense. But you don't really get why recursion is called here and not there, or why it's even needed at all.
Don't. Leave. It.
Stick with it. Dry run it until you understand it inside out.
Otherwise, next time you come back, not only will you have forgotten how to solve it, you'll also have no clue why the solution was written that way.
Pro tip: It's fine to forget the exact code, but never forget the core logic behind it. Something you've already studied should never feel like a blank sheet of paper again.
This one is important (and dangerous if you ignore it), so let me say it one more time:
Never leave a question half-understood!
Anyways...
This is just my journey. Yours might look different, but suggestions cost nothing, so if any of this sounds like it could work for you, open LeetCode right now and give it a shot.
Don't feel discouraged if you don't pass on your first few tries.
To be fair, it's nearly impossible to master something after a handful of attempts when other people have been grinding it for months or even years.
LeetCode is there to help you, not something to fear and avoid at all costs. If you're a developer, questions like these are going to show up sooner or later anyway.
So why wait until you're rushing for an interview? Start today.
Pick a LeetCode interview questions video, follow along, and slowly turn it into a habit. Trust me, one day you'll look back and realise you and LeetCode are getting along too.
You won't regret it!








Top comments (0)