My Brain after 569 Leetcode Problems
Summary
TLDRThe speaker shares their journey of solving LeetCode problems, which eventually led to a Google job offer. They discuss the importance of starting with basic data structures and algorithms, progressing in a structured order, and the value of understanding rather than memorizing solutions. The video emphasizes the balance between practice and learning efficiency, suggesting around 150 well-understood problems are more beneficial than solving hundreds without review. It also touches on the practical applications of algorithms in industry and promotes a platform for tech career growth.
Takeaways
- 📚 The speaker started with easy coding problems and learned the basics of data structures and algorithms, which they believe is enough to start solving problems.
- 💡 They initially used C++ but later switched to Python for its concise code, even though they never used it in a job or internship.
- 🔍 The speaker found that the order in which problems are solved matters and created a roadmap to avoid common mistakes.
- 🚫 They advise against using verbose languages like Java for coding interviews due to time constraints.
- 🕒 The speaker emphasizes the importance of consistent practice over cramming, suggesting solving one or two problems a day.
- ⏱ They learned to recognize when to give up on a problem during an interview, aiming to solve medium problems within 20-25 minutes.
- 🤔 The speaker found that looking at solutions for complex problems can be efficient, as long as one understands why the solution works.
- 📈 They experienced an increase in problem-solving speed as they became familiar with common algorithms and patterns.
- 📊 The speaker believes that the key to passing tech interviews is the ability to apply algorithms to new problems quickly.
- 🔄 They highlight the importance of reviewing past problems for better retention of complex algorithms.
- 📉 The speaker warns of diminishing returns from solving too many problems and suggests focusing on understanding rather than quantity.
- 🎓 Lastly, they argue that while LeetCode isn't the most exciting, it helps with thinking about edge cases and unit testing, which are valuable in industry.
Q & A
What is the speaker's primary goal in solving LeetCode problems?
-The speaker's primary goal is to prepare for technical interviews and eventually secure a job offer from a big tech company like Google.
Why did the speaker initially choose C++ for solving LeetCode problems?
-The speaker chose C++ initially because it was the first language they learned, but later realized it was not the best choice for the interview preparation process.
What basic knowledge of data structures and algorithms did the speaker have before starting to solve LeetCode problems?
-The speaker had basic knowledge of arrays, linked lists, hash maps, trees, sorting, and binary search before starting to solve LeetCode problems.
How many LeetCode problems did the speaker solve before getting an internship at a bank?
-The speaker solved around 50 problems before getting an internship at a bank.
Why did the speaker switch to Python for solving LeetCode problems?
-The speaker switched to Python because it was concise and had the shortest code length, and they did not need to learn the entire language, just the basic syntax and standard data structures.
What is the speaker's opinion on the importance of the order in which LeetCode problems are solved?
-The speaker believes that the order in which problems are solved matters and that problems should be tackled in a specific sequence to build a solid understanding of different concepts.
What is the speaker's recommendation for the frequency of solving LeetCode problems?
-The speaker recommends solving one or two problems consistently each day, as opposed to cramming, to ensure that the concepts stick.
What is the speaker's approach to handling problems they cannot solve within 45 to 60 minutes?
-The speaker suggests that if they cannot solve a problem within 45 to 60 minutes, they look at a solution as long as they can understand why it works.
What is the speaker's view on the number of LeetCode problems one should solve to be prepared for interviews?
-The speaker believes that quality is better than quantity and recommends solving about 150 questions, ensuring a deep understanding of each problem.
Why does the speaker consider reviewing previously solved LeetCode problems important?
-The speaker considers reviewing important for the complex algorithms to sink in, as repetition is needed for the concepts to be well understood.
What is the speaker's stance on the usefulness of LeetCode for learning about application development?
-The speaker believes that while LeetCode may not directly teach application development, it helps in thinking about edge cases and unit testing, which are applicable in industry.
What is the speaker's suggestion for those who feel they are not fully prepared for big tech interviews?
-The speaker suggests that feeling 100% prepared is rare, and that one should aim to solve a medium problem in 20 to 25 minutes to have at least an 80% chance of passing most interviews.
Outlines
😀 Journey to Google Through LeetCode
The speaker shares their personal experience of solving LeetCode problems, which eventually led to an offer from Google. They discuss the importance of different levels of preparation and the process of interviewing candidates. Initially starting with C++ and later switching to Python for its conciseness, the speaker emphasizes the value of learning basic data structures and algorithms before diving into problem-solving. They also highlight the mistake of solving problems in a random order and the importance of tackling them in a structured sequence to build a solid understanding. The speaker shares their strategy of solving one or two problems daily for better retention and the realization that looking at solutions is not shameful if one can understand the underlying logic. This approach helped them to quickly increase their problem-solving skills and reach a point where they could solve complex problems efficiently.
😌 The Perpetual Preparation for Tech Interviews
In this paragraph, the speaker delves into the perpetual nature of interview preparation, particularly for big tech companies like Google or Facebook. They admit that feeling fully prepared is rare, as the unpredictability of interview questions makes it a probabilistic endeavor. The speaker suggests that being able to solve a medium difficulty problem within 20 to 25 minutes is a good benchmark for an 80% chance of passing most interviews. They also share their personal journey of solving up to 569 problems, not just for the challenge but to refine their skills. The speaker emphasizes the importance of quality over quantity in problem-solving and recommends revisiting and understanding each problem deeply. They propose creating multiple-choice quizzes as a method for efficient review and highlight the value of LeetCode in teaching edge case thinking and unit testing, which are applicable in real-world application development. The speaker also mentions the importance of continuous learning and improvement in the tech industry, suggesting platforms like Taro for career growth and professional development.
Mindmap
Keywords
💡LeetCode
💡Data Structures and Algorithms
💡Edge Cases
💡Dynamic Programming
💡Python
💡Sequential Questions
💡Backtracking
💡Algorithm Patterns
💡Interview Preparation
💡Taro
Highlights
The speaker has solved numerous LeetCode problems and eventually received a job offer from Google.
After interviewing over a dozen candidates, the speaker learned about different levels of preparation for coding interviews.
The speaker initially started with C++ for LeetCode but later realized it might not be the best choice due to verbosity.
Having basic knowledge of data structures and algorithms is sufficient before starting to solve LeetCode problems.
Solving 50 problems was enough for the speaker to secure an internship, but further improvement was necessary for big tech companies.
Switching to Python for LeetCode was beneficial due to its concise syntax, even without prior experience.
The speaker advises against using verbose languages like Java for LeetCode problems.
The speaker emphasizes that problem-solving speed in an interview is less important than the ability to solve the problem correctly.
LeetCode questions should be solved in a specific order to build a solid understanding of algorithms progressively.
Consistently solving one or two problems a day is more effective than cramming for LeetCode preparation.
The speaker suggests that if one cannot solve a problem within 45 to 60 minutes, it's unlikely they will solve it on their own.
There's no shame in looking at a solution for a LeetCode problem as long as one understands why it works.
The speaker created a roadmap to guide the order of solving LeetCode problems to avoid common mistakes.
The speaker was able to solve 250 LeetCode problems faster than the first 100 due to learning patterns and tricks.
Most LeetCode problems fall into specific buckets of algorithms, which can be mastered with practice.
The speaker suggests that being able to solve a medium problem in 20-25 minutes indicates readiness for tech interviews.
The speaker solved up to 569 LeetCode problems, emphasizing the importance of quality over quantity in problem-solving.
Repetition and review of previous problems are crucial for mastering complex algorithms.
LeetCode may not teach everything needed for application development, but it helps in thinking about edge cases and unit testing.
The speaker mentions Taro, a platform for tech career growth, as a resource for further learning and development.
Transcripts
I've solved a lot of leak code problems
hey guys I'm still unemployed so let's
solve another leak code problem and
eventually got an offer from Google
where I've interviewed over a dozen
candidates after hundreds of hours of
grinding and explaining problems I
learned there are different levels of
preparation and I'll share everything I
know about the process including how to
practice how many problems you should
solve common mistakes to avoid and
whether I think leak code is a total
waste of time like most people I started
with easy questions I used C plus plus
because it was the first language I
learned but this was a bit of a mistake
and unfortunately I didn't learn so
until later on initially I wasn't even
able to solve the easy problems even if
I knew the solution I would always get
tripped up by edge cases I wasn't an
expert in data structures and algorithms
I mainly knew the basics like arrays
linked lists hash Maps trees sorting and
binary search and honestly I think
that's pretty much enough before you
actually start solving problems because
a lot of the easy problems will solidify
your understanding of the basics and 50
problems later that that's where I was I
could solve a lot of the trivial
problems like reversing a string or
inverting a binary tree but I hadn't
even touched a graph problem and I
didn't even know what dynamic
programming was but believe it or not 50
problems was enough for me to get an
internship at a bank but I knew I had to
keep grinding if I wanted to get a job
at a big tech company so I continued to
solve problems in a random order which
was another mistake but probably 60 or
70 questions and I switched to python I
would always look at the leak code
discuss section and I saw that python
code was always the shortest and most
concise even though I had never used
python before and still to this day I've
never used python at any job or
internship it was an easy choice to make
because you don't have to learn the
entire language you really just have to
learn the basic syntax how to write if
statements for loops and all the
standard data structures and methods and
you can actually learn these as you
solve leak code problems just by
Googling as needed now C plus isn't a
bad choice either but I would definitely
avoid a verbose language like Java the
language probably won't be be a deal
breaker but it can definitely save you a
few minutes when you're typing out your
code which can definitely make a
difference in a real interview but it
doesn't matter how fast you type if you
can't actually solve the problem and
even after solving a hundred problems
while I had learned all the high value
algorithms like DFS BFS sliding window
and backtracking I wasn't able to
consistently solve a new problem for the
first time I didn't know it then but the
reason was that a lot of leak code
questions are sequential you've probably
seen questions like House robber 1 House
robber 2 and House robber 3. obviously
you should solve these questions in
order but actually most of leak code
questions should be solved in a specific
order for example you should never try
solving dynamic programming problems
unless you already have a solid
understanding of backtracking and you
probably shouldn't try solving graph
problems until you have a solid
understanding of trees this is obvious
in hindsight but I'm sure a lot of
people make this mistake which is why I
created a road map so that you don't
make the same mistake I did it turns out
that the order you solve problems in
does matter I also think that solving
one or two problems a day consistently
is a lot better than cramming because
the ideas will actually stick if you
need a little motivation I've been
solving daily lead code problems on my
second Channel as I continued I realized
that if I couldn't solve a question in
45 to 60 Minutes I wasn't going to be
able to solve it myself previously I
would literally bang my head against the
wall for three to four hours on a single
problem because I thought that was the
only way to learn but let's just be
honest most of us are not going to be
able to come up with some of these
complex academic algorithms by ourselves
and even if you can come up with Floyd's
tortoise and hair algorithm it's
probably not an efficient use of your
time there's no shame in looking at a
solution as long as you can understand
exactly why it works that's why in my
videos I really try to explain my
thought process behind every problem
this ended up saving me a lot of time
because I would get to a really hard
problem a crackhead problem I like to
call them like burst balloons and I
would get pretty close to solving the
problem I would know it's a dynamic
programming problem but I just couldn't
figure out the trick behind it then I
would look at a solution and only after
five minutes of reading I would realize
oh that's the trick and then I would be
able to immediately solve the problem I
was able to go from 100 to 250 solved
questions a lot faster than I was able
to solve my first 100 questions and by
then I had learned 99 of the patterns
that I needed even some of the complex
ones and I got to the point that writing
out these algorithms like DFS BFS and
binary search was as easy for me as
writing a for Loop even some Advanced
ones like Union find dixtras I could
write out in less than five minutes and
that's when I realized that most leak
code problems fall into these buckets
for medium questions you just need to
figure out what algorithm you need and
then apply it hard questions are similar
except there's usually a really complex
trick behind them and sometimes unless
you've seen it before only God can help
you figure it out or maybe your
interviewer if they happen to be
generous at this point I was confident I
could pass interviews but I wasn't 100
sure if I was ready for the big Tech
interviews like Google or Facebook and
spoiler alert you will probably never
feel a hundred percent prepared it's not
a binary decision whether you are ready
for an interview or not because you
never know which questions you're going
to be asked it's more of a distribution
you might have a 50 chance of passing or
you might get to the point where you
have a 90 chance of passing if you're a
perfectionist I'm sure you want 100
chance but that's almost never gonna be
the case I think a good rule of thumb is
that you should be able to solve a
medium problem that you've never seen
before in 20 to 25 minutes if you can do
that you probably have at least an 80
chance of passing most Fang interviews
and I continue to solve up to 569
problems even though I had already
gotten into Google mostly because I'm a
loser but it's not quite as time
consuming as you might think because
I've gotten to the point that I can
solve most medium questions in 10 to 15
minutes but I definitely don't recommend
it because there are diminishing returns
on solving more and more problems
problems I think quality is much better
than quantity I recommend solving about
150 questions like the neat code 150
list which has video Solutions and code
Solutions in 14 languages but make sure
you really understand each and every
problem a huge mistake that most people
make is that they don't go back and
review previous problems for these
complex algorithms to really sink in you
need repetition that's why I'm working
on taking each problem from the neat
code 150 list and converting it into a
multiple choice quiz because it's really
hard to go back and resolve each
question and usually all you need to do
is review the trick so I made quizzes
that you should be able to solve in a
few minutes but also get a lot of value
from it you can check out a handful of
problems right now but when the list is
complete ideally you should be able to
go through it in just a single day I
think this will be a huge Time Saver for
people so after all that is leak code
just a big waste of time yes if you're
trying to learn about development and
actually building applications lead code
probably isn't going to help you do that
but people will spend thousands of hours
getting a CS degree to get a decent
paying job but won't spend an extra 100
hours to get a big compensation bump it
doesn't really make sense to me don't
get me wrong leak code isn't the most
exciting thing in the world but I do
think it helps you think about edge
cases and how you would unit test your
code these are skills that can be
applied to application development and
believe it or not algorithms and data
structures are widely used in industry
from database engines to compilers but
it's true that leak code won't teach you
everything that's where Taro comes in
it's a YC backed platform to help you
grow in your Tech Career including
helping you onboard as quickly as
possible and get you a faster promotion
using master classes with experienced
tech leads and leaders you can check it
out using the link in the description
and use code neat code for 20 off
premium thanks to Taro for sponsoring
this video and I'll see you guys soon
تصفح المزيد من مقاطع الفيديو ذات الصلة
5.0 / 5 (0 votes)