My Strategy to use LeetCode for Cracking Coding Interviews Effectively

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
think about it you solve at least hundred lead code problems when you are preparing for coding interviews each problem on average might take about one hour so before you spend 100 hours of your time on lead code please listen to these tips and i'm sure that they will boost the total value that you extract from this platform for preparing for coding interviews all right the first step is avoid using the submit button well what i mean by that is all of us do this thing where we think of some approach we write it down and then click on the submit button 10 times 20 times we keep on doing this until it gets accepted right because that's how we are practicing we have a lot of time we have to practice a lot of problems so as soon as we quote something down we directly submit like we don't even consider whether there are any bugs or whether it will even compile all we rely on submit button is not just a submit button but a test button also this this seems easy and it's quite handy to do that but the problem with that is in interviews if you make 10 changes or 10 mistakes to your approach or code it's already declared that you are not a good problem solver or you don't have good command over translating your thoughts into code so you need to develop this quality in you wherein you are looking at your code and you can come with a binary judgment about your code whether it's totally correct or totally not it should not be that yeah i'm sure that i'm 80 percent sure that it will work you need to be 100 sure and say with confidence to your interviewer that yeah i'm sure that what i've returned is right so yeah you can have a look now so this is the skill that we want to develop and to do that we need to practice in a similar fashion so avoid using the submit button repeatedly just have a look before you submit and give it your best attempt like set this expectation that when you are clicking on the submit button it should ideally get accepted okay moving on trip two yeah it's very important that you de-prioritize bad problems so when i'm saying de-prioritize bad problems i'm not saying that stop doing problems but i want you to first do the good problems only it holds so how do you find that just to give you an example if you look at this problem 237 it is titled as delete node in a linked list so the title is very easy to understand right delete note in a link list well now what you will do is you will read the problem statement and start solving but before you do that i just want to take one moment to see what is the tag and what are the number of likes on it not only that i also want you to compare the number of likes and dislikes and you can see that it has massive dislikes as compared to the number of people who have liked it and there are reasons for that you can go to the discussion tab in every problem and you can actually see why people feel it's so bad i'm sure someone has commented that why they have disliked it for this particular problem the bad thing was i mean deleting a linked list node like people were asking why even lead code accepted such stupid question and the problem description was also very bad so this is something which you have to keep in mind when you are using lead code it's very good it's free for us but at the same time we also need to be smart about what we are devoting our time into we always have to pick those problems first which are having good likes for example i'm giving you an example for a problem on a tree it's a medium level problem and it's about all elements in two binary search trees and this is something which is fairly good percentage of likes and dislikes unlike the previous one which was having six thousand dislikes so just not start doing problems just make sure that the problems that you're doing should be done by you like have that prioritization list with you and this is one easy way to do that if the problem has a lot of dislikes you can deep right is for now like if you have solved all the problems good quality problems for some topic and only the bad ones are remaining probably at that point of time you can do them all right moving on to tip number three newton's first law so what i mean by that is all of us know about lead code and other platforms to improve our skills right but what most of us lack is consistency and we easily get demotivated okay and newton's first law is all about the inertia if a body is at rest it will stay at rest and if it's in motion it will stay in motion this is one of the reasons why it's very difficult once like you have a static object which is not moving to put that into motion it takes a lot of efforts right so that's what i'm exactly talking about we all know such platforms likely it could improve our skills but what we lack is consistency like what most of us lack is consistency and like it's very easy to get demotivated in this field so we have to develop the ability to pick up concepts and improve over time and stay consistent most importantly and you have to believe that it will happen and you have to accept your current level all of us are in the same train journey maybe some of us voted early and some of us boarded the faster train but you still have your own train and all of us are headed towards the same journey to excel in coding interviews right so keep patience and you know just start solving five to ten easy problems in a day if you can do that it will feel better like you are able to solve some five ten problems you're making progress it's good for you like your thoughts are being converted into code it's also a skill that you have to develop once you're comfortable with easy problems i would suggest you to move to five to ten medium problems a day right and this is how you can create the momentum which needs to be created where your fingers are able to convert your thoughts into code it's very important just to get started so i would suggest you to start with easy then slowly migrate to medium and then only you should migrate to heart problems not only that you also have certain topics like you might be good at dynamic programming but you might not that be good with pointers and link list so you also have to work on the topics in which you're not good at and that's what we will also cover in the further tips so the tip number four is about using the filters the right way and what you can do about that is nothing but you can go to lead code problem set you have a list of problems right like you can see heart problems medium problems you can sort them by difficulty you can see a list of easy medium hard problems then what you can also do at the same time is you can select the difficulty level from here if you want to target easy problems you can simply categorize or filter out the problems that your level matches like i will remove the easy for now you can also go to the tags what i was talking about in two minutes back if i want to solve linked list problems i can select that tag and have a list of easy medium and hard problems for linked list and i can start solving them i can also you can see i have actually solved three for easy and then medium and as well as some harder problems so this is what you have to do while you are solving easy medium problems you can also navigate into the particular tags which make you uncomfortable and you can start solving them so this is what the tip number five is step out of your comfort zone and it's quite similar to what you have heard in gyms like no pain no gain so many students ask me that they are working hard but not improving so one thing that i would like to ask you is if you keep on doing dynamic programming problems for eternity then how can you expect to be good at graph algorithms as well right so you have to keep in mind that there are certain tags certain topics which really make you uncomfortable just because you have not done even like a lot of practice for those problems so you have to solve problems that you that make you uncomfortable you have to solve problems that challenge you this is the only way you will actually improve and if you remember if your train is like really behind then the train of other competitors that you have like other students or other friends so the only way you can make your train run faster is by doing more of the things which make you uncomfortable if graph algorithms is something you fear a lot start doing that and this channel has a lot of playlists i have a video playlist for graph algorithms i have also done a lot of dynamic programming problems i have a playlist for that as well i also have normal problem solving videos in which i also share about google code jam analysis and solutions so you can use a lot of content i will have those links in description but other than that what i really want you to do is yourselves also you should go to lead code try to navigate into those problem tags which really make you uncomfortable right and just we have seen in this video how you can select those tags how you can have a list of problems sorted by the difficulty level so based on your expertise in that tag you can start solving three to four easy problems maybe if you are good with that migrate to medium problems and then also migrate to heart problems this is the only way you can improve and learn and it's quite easy now computer programming is also a good option but it's an overkill just for coding interviews and since the video topic is lead code i'm expecting most of the audience for this will also be interested in coding interviews so yes guys that's pretty much about it so for example uh you can start solving medium problems if hard problems are like really tough for you so don't try to just start doing heart problems just because i've said step out of your comfort zone you should also be productive you should also be making progress so if harder problems really make your day less productive then it's probably a good idea to start doing medium problems first and i do feel at this point of time it's quite important to mention one thing so if you are solving some problem and you are stuck with it what you can do so what you can do is for example this is a good problem right middle of print list it's having 1000 likes 56 dislikes pretty good so you read the problem you try on some solution but it's not working you can go to the submission stack to see your submissions of course but the discuss tab is pretty useful for business you can see a lot of people post a lot of comments solutions and explanations to every lead code problem and these are all free so what you can do is you can see like javascript java like all languages are covered you can open the most submitted solution and you can see the code as well as some explanation but again you cannot rely on it too much but i think most of the problems have this so it's pretty like really useful in case when you are stuck at some problem and at that point of time instead of going to stack overflow or maybe some other code forces blog post it's quite easy just to go to the discus tab read the solution and make progress and in summary what i would like to say is you really have to work hard there is no other shortcut about that you have to give it time and by that what i mean is don't give it more than 30 minutes also if for some problem in 30 minutes you feel that you're not making a lot of progress at that point of time i want you to go ahead and read solutions but again if you are writing code then again remember not to use the submit button as a test button use your mind for that go through the code make sure that you really are confident and only then hit the submit button we want to develop that quality basically that when the interviewer is saying okay so have you written the pseudocode uh we are saying yeah and it should handle all the corner cases i have handled everything yeah so it should work you should be confident at that point of time all right so um when we were not able to solve it okay we go to the discussions tab we read the solutions we feel quite normal and better so but at that point of time it's always useful and that's where a lot of people lack they don't resubmit the code so once you are not able to solve the problem and you went ahead in the discussions tab you saw some solution or you read about the approach just don't leave it over there you have to resubmit it and that's another quality that you have to develop like if you're not able to solve something you read about it and then you solved it it's very important it helps you improve and then once your solution is accepted a lot of people now migrate to solve more problems because they have this target key five to ten problems a day we have to do that now it's not useful right once you have solved it absorb what you have done what you have learned why you are not able to do it in the first place and also most importantly make sure that you write clean code have a look at your code again yeah it's giving you 100 points but can you make it better can you make it shorter think of all those things can you write some function which you can reuse which can make that pro like your solution a bit smaller and easier to understand so do all those things so yeah these were the five tips and this is what the summary looks like this is exactly what you have to do and i think it's more than good for beginners to really make good progress in actually one or two months if you keep doing this let me know in comments what you think or if you have any other tips and ah other than that if you are preparing for interviews and you are planning to use these products make sure to use the coupon ratchet to enjoy a discount and also support this channel links are in the description guys and the social media handle is richard itr instagram and twitter make sure to follow over there and bye then happy coding enjoy and i'll see you in the next one [Music] you
Info
Channel: Rachit Jain
Views: 232,322
Rating: 4.9451175 out of 5
Keywords: coding interviews, algoexpert, dailycodingproblem, goldman sachs, flipkart, microsoft, google, interview questions, software engineering, coding interview problems, data sturctures, algorithms, ds algo, leetcode solutions, coding interview prep
Id: q15JgVVLXQg
Channel Id: undefined
Length: 13min 24sec (804 seconds)
Published: Wed May 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.