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