Welcome to Pirate King. I'm Daniel, a Software Engineer at Microsoft, ex-Software Engineer at Amazon and ebay,
and also a Software Engineering Mentor at two educational startups
Here, we talk about tips and tricks on how to land a successful career in tech
So if you are interested in learning the clever strategies that increase your chance on landing the jobs
make sure to subscribe
In this video, I'm going to share an effective strategy on how to prepare for LeetCode
I have broken down the strategy into five steps that'll help you build a strong foundation
on coding interview skills as quickly as possible
The motivation behind this is that as a Software Engineering Mentor
I have found so many people having trouble figuring out where to even begin
If you are one of those guys intimidated by the sheer number of questions on the platform,
unsure where to start, and unconfident that you can pull this off yourself,
make sure to stay until the end because I guarantee that you'll walk away with a clear game plan
The very first thing you should do is getting that premium subscription
It's $35 per month or $160 per year, and no, I wasn't paid to say this :P
Despite the cost, I recommend it because it's totally worth it
I've had my premium when I prepared for Amazon and Microsoft
Its access to company-specific questions is a must if you want to drastically increase the chance of landing a job for that company
If you also think about it
You'll easily make six figures in salary if you get into renowned companies
You'll still make a decent amount anywhere else because the salary for Software Engineers starts at around $70k in the US
And I can't imagine anyone not serious about becoming a Software Engineer having interest in leetcode anyways
so make that investment for your future
Start with the Top 100 Liked Questions
These are not the questions handpicked by any individual or LeetCode itself
but the questions liked by the entire community - the other leetcoders
And there's a reason why people upvote certain questions
Let me explain by giving examples of those that are downvoted
A question is heavily downvoted if it has too many tedious edge cases
It's not very clear or hard to understand
It doesn't require general data structure and algorithms - but very specific knowledge like math tricks
Or if the solution's just... too messy
It's those questions you should avoid in the early stage because you want to concentrate on the ones that are simple and easy to follow first
Questions that explore the core concepts of data structure and algorithms
yet are clean and straightforward are the ones that are great for establishing that solid foundation
I recommend starting with about fifty questions here
Avoid hard for now
Get a sense of where you are with fifty easies and mediums first.
After you've explored the 100 liked questions, it's time to focus on the questions topic by topic
Don't just run off solving random questions
You've already done that from the 100 liked questions
Its purpose is to give you a taste of the platform and set the right expectations
Now that you have a taste of what coding interview questions are like, it's time to choose a topic and start drilling down
Don't just blindly attempt easies
How leetcode determines a question's difficulty is subjective and thus often inaccurate
Instead, order them from highest to lowest acceptance rate It's objective because the data's community driven
In fact, the acceptance rate of some easies is lower than 50% while that of some mediums are higher than 80%
Leverage the stats
Let me tell you why this is effective
As you solve more and more questions from the same topic, you'll start to realize that there is a pattern to it
Realizing the pattern is basically the winning formula, the template, and the very algorithm you need to be successful at leetcoding
Once you've mastered it, or get that "tick" from your brain,
you'll realize that you can use it to solve most of the problems in the topic
For example, the binary search implementation that finds the left-most occurrence of an element,
the four ways to traverse a binary tree, DFS and BFS templates in a 2D array or a graph
Two Pointers? Memoization? Tabulation?
What would be a good situation to use a stack?
a queue? recursion? or dummy nodes?
You won't see what I mean if you jump off solving questions randomly
It's best understood by practicing similar questions in the same topic
Here's my recommendation
Solve at least twenty questions or until you get that "tick" for each topic before moving on
Here's my list of topics to start you off
You don't have to follow this list
Just remember
For any topic you choose, make sure to practice until you fully understand the pattern
It's the key to solving any questions within that topic
Once you feel confident with the topic
Move on to the next
Rinse and repeat
Now that you have this mini curriculum, practice with a plan
One. Don't attempt hard now
Start with easy and medium
Go for hard when you think you are ready. Trust me. You'll know as you practice
Two. Don't spend more than thirty minutes on an easy and an hour on a medium
In an ideal setting, we would try to solve a question with our strength alone
However, if you are leetcoding, chances are, you are doing it for jobs
And obviously, we don't have all the time in the world
If you can't solve it, just look up the solution and quickly move on
Three. Learn from the solutions
Like I said earlier, if you focus on solving problems in the same topic,
you'll start to see the pattern and the techniques you need
And the best place to learn those is none other than the solutions
You can also find solutions outside leetcode as well
For example, there are a ton of videos on YouTube that actually does a better job at explaining than LeetCode
Four. Use the discuss tab
If the solution's not available on neither LeetCode nor YouTube, look them up in the discuss tab
You'll be amazed at the thousands of brilliant people in this world!
Look at the clever tricks these smart people use and learn from them
Another reason why looking at the discussion board is helpful is because it helps you discover ways to optimize your code
Remember runtime complexity?
It's not uncommon for you to submit a solution that's accepted by leetcode yet is still not optimal
Companies are not looking for any candidates who can just brute force their way through
they are looking for those who can optimize and find better ways to solve the same problem
Lastly five. Revisit your questions
If you had to look up the solution to solve a question,
the chances are, you won't be able to solve it a week later
But do make sure to revisit them just in case to confirm that you can still solve it
Besides, it's a good way to review
Solve company specific questions
After you've solved a good number of questions and gained a good understanding of how the coding interviews are like
it's finally the time to actually do one!
Do you have an upcoming interview with a company?
Well, take a look at the list of companies available on LeetCode
This is where the LeetCode premium really shines. You can filter the questions by companies!
You can even order the questions by their frequency in a select time period!
All these wouldn't have made sense, however, if the data is inaccurate
From my own experience, it's pretty damn accurate
In fact, my bar raiser question at Amazon onsite was one of the questions here
Three out of seven questions I was asked at Microsoft were from the list too
You might think less than 50% accuracy isn't that high
But given you don't need to be perfect to land a job, being able to ace even one is enough to put you in a great position!
By the way, if you are interested in how I aced my Microsoft interview
you can check that out here
So we've covered the five steps that helps you effectively prepare for LeetCode
Let me summarize them again for you
Those steps are
I know you wanna ask this question
Can you share the interview questions you had for Amazon and Microsoft?
Well, I can. I always record those after each interview
But let me ask you this
Will that really help you?
There are a thousand Amazon questions and more than six hundred Microsoft questions on LeetCode
The chances are, you won't get the same question anyways
But if you really do, it would simply mean that you had practiced the ones...
here!
The point is. Establish that foundation
You know yourself that simply solving the questions I got won't be enough
Make sure to follow my steps
Practice. You'll find yourself improving day by day
Remember. It's all in... here!
Check out the description below. Cuz I've put some useful resources and links in it
Don't forget to comment, like, and subscribe
Coming up next. Why I left Amazon
Thanks for watching. I'll see you guys on the next one
Bye