Do you want to ace your next interview for a machine-learning role?
If so, then you’ll probably need to practice with LeetCode.
LeetCode is a website where you can practice coding questions for interviews. It is also a great place to learn new concepts and algorithms.
In this guide, we will learn how to use LeetCode (the right way) to improve your chances of getting a job offer!
What’s the Best way to do Leetcode?
If you’re hoping to ace your next coding interview, Leetcode is a great resource to use.
Since there are so many LeetCode questions, it’s most important to spend your time on questions that will come up in interviews.
I know what you’re thinking, “Thanks, Dylan; if only I knew what questions would be asked in my interviews, I wouldn’t be here in the first place!”
I have great news, there is a way to know what will appear in your next interview.
A little history lesson first.
The Blind 75
In 2018, on the famous software engineering forum “Blind,” an anonymous Facebook employee released a list of 75 questions he repeatedly saw in interviews.
Basically, after going on tons of interviews, some variation of these 75 questions kept popping up over and over again.
While this may not sound like a big deal, it’s been a game-changer for the industry.
Instead of trying to memorize and do thousands of LeetCode questions, you’re only responsible for learning about ~75 questions.
Which, at about a question a day, is a 2-month prep period (assuming you know none of these questions).
This will be the heart and soul of your prep, as it’s been tried and tested for the last five years and has gotten thousands of people jobs.
Link to the original 2018 Blind Post From the Facebook Engineer:
My Personal Machine Learning Engineer LeetCode Plan That I’ve Used
I usually start my preparation for roles about 2 months before I’m looking to interview.
I’ll dedicate one hour a day to LeetCode, and scale that number up as I get closer to interviews.
While I would paste all the questions here, my favorite free resource is Neetcode.io.
The list mentioned above is put into a cool web-app, so you can track your progress.
Once on Neetcode.io, you’ll see the category “Blind 75,” – which will list the 75 questions from above.
I like to work through each subcategory (ex: Linked Lists) from easy to hard, taking notes and trying to fully understand each question as I go through it.
As proof, here’s a screenshot of my “LeetCode” profile; as you can see, I only repeatedly do the same ~100 questions (Blind 75!!).
(I wimped out on the hards)
Isn’t The Blind 75 For Software Engineers?
Yes, the Blind 75 is for software engineers. As a future machine learning engineer, you will be lumped into the software engineer category at any company you join.
Since machine learning engineers and software engineers are very closely related, they will use the same type of questions (LeetCode) in your interviews, you just will not be seeing as many coding rounds as the software engineers.
This makes it highly important that you’re able to pass these, as there aren’t going to be any “make-up” coding rounds to prove that you can invert that binary tree.
Are the Interview Questions (LeetCode) different for machine learning engineers and data scientists?
The main difference that I’ve seen between Machine Learning Engineer interviews and data science interviews is the presence of SQL.
Nearly all of my data science interviews had a SQL component, whereas most of my Machine Learning Engineers had a system design component.
Should You Prep SQL LeetCodes for the Machine Learning Interview?
If you’re running low on time, you could possibly skip prepping SQL for your machine learning interview – but I wouldn’t recommend it.
Before your interview, spend a weekend learning the basics (Selects, Joins, CTEs, Window Functions).
You can cover a lot of territory only by learning just the basics of SQL.
Frequently Asked Questions
Should You Pay For Leetcode
I have never purchased LeetCode premium. (sorry, LeetCode). However, a few questions on the Blind 75 require premium.
Is LeetCode Better Than AlgoExpert?
With how powerful the Blind 75 is, I don’t see a need to buy a structured program. Combining neetcode.io with a couple of months of prep time should suit you well.
Do All Roles Need Leetcode?
Not all roles need LeetCode, and not all companies give coding tests. Do some research on your specific company beforehand and prep accordingly.
Other Learning Material
At enjoymachinelearning.com, we only recommend six books.
Those 6 books are the ones in the images below
Check out some of those posts:
- What Is A Good Accuracy Score In Machine Learning? [Hard Truth] - March 22, 2023
- Machine Learning: Validation Accuracy [Do We Need It??] - March 15, 2023
- How Can Data Science Improve The Accuracy Of A Simulation?? [Heres How] - March 15, 2023