Do some Leetcode.
Not too much, not too little.
Use it freely to explore new languages, because you'll learn the basics of variables, control flow, and iterations.
My anxiety reached new heights in February.
I had to do Leetcode.
I’ve been a software engineer for 10+ years but the last time I did Leetcode was during my studies.
Why?
I had real things to work on as a software engineer. 😬
And even after leaving the first company that hired me and doing freelancing, nobody ever asked me to do Two Sum, then wired $5000, left a 5 ⭐️ comment saying “would work with him again”.
No-no.
Freelancing looks like this:
Can you do this by Monday?
Yesssir!
Yet, Leetcode has grown into this necessary evil of tech-hiring.
Why?
How to get the most out of it?
These are some of the questions I’ll answer in this newsletter, so let’s get started!
So this year in May I decided to put my freelancing business on hold and go back to the sweet promises of 9 to 5:
work-life balance
stable payment
pumping carving during Halloween (?!)
Offers you can’t say no to. 🤤
🚼 Why I Got Started
After cleaning up my CV (the right way) I felt something was missing and yes… it was Leetcode.
But I had to be careful.
I’ve been in the interviewer’s positions many times and I knew Leetcode is only part of the story. This is why I didn’t go all-in on it, like some of you:
🫸 Why I Didn’t Pick a Language I Know
This is where things started to get interesting.
I read a couple of job ads from companies I wanted to work with.
My conclusion was: They like Go.
So instead of just focusing on the DSA aspects of Leetcode and warming up my brain for problem-solving, I decided to solve two problems at once (see, already a Leetcode expert):
Get better at a new language while practicing problem solving!
Leetcode helped me learn the basics of Go and now I’d pick Leetcode to learn the basics of a new language again!
Now, don’t think I ran through 100 problems.
3 were enough to learn the interactions, some flow control, and their type-system.
But what else did I focus on?
🧑🎓 Memory vs. CPU usage - Think Basics
One lecture I vividly remember from my studies is where we wrote the same algorithms but we either optimized them for memory consumption or speed. We found that often we just trade one for another and we can’t always get both.
So I took the few problems I have already solved and tried to solve them differently.
First I did a solution that wasn’t quite fast but easy on the memory (still bad I know):
Then I tried to switch things up and go as fast as possible, given I have unlimited memory:
Understanding the difference and how you can switch between the two was an additional brain game that further helped to warm up my Leetcode-cortex (please don’t look this up).
🤓 Why We Have Leetcode in Interviews
It’s efficient.
Yes, it’s also a terrible way to assess someone’s ability and future potential to perform as an engineer, but it’s efficient. Especially at popular companies.
Why?
Some companies get hundreds of applicants every day. You can’t sit down with everyone to do something hands on or give everyone a takehome assignment, wait a couple of days then get engineers look at it.
It would be time-consuming, and it would cost a lot of money for the company.
For some unknown reasons, small companies adopt this as well, but I think they’re just missing out on great engineering potential.
Ideally a small company should be fine with:
initial discovery interview
some takehome assignment or live coding session
talk with someone from the management or leads and ask more lose ended question about experience, software design or whatever is relevant for the role.
Now real talk, when was the last time you did some Leetcode and how it went?
Are you a Leetcode guru?
Do you think it’s necessary for all companies, regardless of their size? Why?
📰 Weekly shoutout
📣 Share
There’s no easier way to help this newsletter grow than by sharing it with the world. If you liked it, found something helpful, or you know someone who knows someone to whom this could be helpful, share it:
🏆 Subscribe
Actually, there’s one easier thing you can do to grow and help grow: subscribe to this newsletter. I’ll keep putting in the work and distilling what I learn/learned as a software engineer/consultant. Simply sign up here:
I have never used leetcode, doesn't seem to be as popular in SQL interviews, but sounds very stressful
Small organisations definitely miss out when they use it. As you say it's an efficient (if not great) filter if you have too many applications to handle without it and are willing to reject good candidates (because you have enough good candidates who will pass the filter too).