Use Leetcode EFFICIENTLY | Don't Be Fooled by this Feature πŸ™ˆ

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hey everyone, Welcome back to the channel. I hope you all are doing extremely well Sorry sorry(not welcome back), welcome back to the new channel Because I told in my previous video which I uploaded on my another channel, that I am going to launch a new channel for general content Because our tutorials and general videos were getting mixed up there And these types of videos were not able to reach to a wider audience So that's why I thought of making a second channel , because now content can be segregated It does mean that I will stop uploading videos on that channel, you will get regular videos on that channel every week and here on this channel, I will upload a video every sunday Also, here on this channel, I will talk in hindi and while doing so, if I make any mistake, don't make fun of me, correct me by letting me know about my mistake in the comment section I am good at communicating in English as compared to Hindi So let's start. In today's video, I am going to talk about Leetcode Whenever we ask any of our senior regarding interview preparation, they suggest us to do Leetcode or GFG So what does they actually mean when they say 'Do leetcode' We will talk about GFG in some other video, but here in today's video we will talk about how to do leetcode First thing which we will discuss is, how to practice on leetcode And the second thing is, how we will come to know that the solution which we submitted is the best possible solution or not. if not, then how can we see the best solution we will also discuss other important features of Leetcode 3rd point is, how many questions we should do on Leetcode so that our chances of getting a referral increases even if we have not done CP much So we are going to discuss these 3 points in this video The first thing which I would like to clear is, even if you are very good competetive programmer, you need to do Leetcode if you want to crack interviews of companies like Amazon,Google, Adobe, Microsoft, etc Because we don't use concepts like Binary trees, Binary search trees, Linked list in competetive programming So to do these types of questions, you need to do leetcode or practice on GFG Why I am talking about Leetcode here? Because the UI and features of Leetcode are much better when you compare it to other practice sites So let's start talking about leetcode The first thing is, when you come to leetcode, don't get fascinated by seeing all these things here because you will not be able to focus on the main part then. We will directly move to the problem section, because that is what we actually need When you will start leetcode, start with easy problems Because this will help you in getting familiar with the platform interface. So apply the filter of easy problems here and try to solve them You can also sort the acceptence in descending order if you want to solve easy problems first or sort it in ascending order to solve difficult problems first How many easy problems should we solve? According to me, you should practice around 30-40 easy problems. There is no point of solving 200-300 easy question, because we don't learn much in that By solving 30-40 easy problems, you will come to know how to approach a problem, it's implementation and all that Then you should shift to medium section. Don't waste much time on easy problems Similaryly, here also you can solve 30-40 questions by sorting the questions in descending order and then 30-40 questions by sorting them in ascending order If you will solve around 150-200 medium level questions, then you will become familiar with the implementations, algorithms, etc Once you are done with easy-mediums, then you can solve with hard problems Here I will recommend you to solve questions by sorting them in descending order of their acceptence because these questions are already hard, if you will sort them in ascending order, then it will become really hard for you to solve them If you are a leetcode premium user, you will also come to know about the frequency of a particular question, like which company asked this particular question but I will not recommend leetcode premium because it is too overpriced The amount they charge for these features is not justfiable. You can copy the question and paste on gfg and see the company tag from there. So it is not necessary to get leetcode premium Here you will also find few locked questions, which are only accessible to the premium members, so should we take leetcode premium? No, first solve 300-350 questions, and if you still feel that you need to practice some more good questions, then you can take it But solve 250-300 questions before taking leetcode premium You can also solve questions from a particular topic. Let's say, you are not comfortable with DP questions then you can search questions on DP, which are around 255 in numbers, and solve them Also if you want to practice few specific questions, then leetcode also has a section for 'Top interview problems' , you can practice from there I have solved many problems from this section, because these are very much similar to the SDE sheet which many people solve So you can also solve my SDE sheet, you can search the name of the question on google, you will get that question here on leetcode, so you can solve that here So this is how you have to practice if you are a newbie And if you are only preparing for interviews, then you can pick any SDE sheet and search and solve that question on leetcode Even if you solve 180 question sheet provided by me, you will be ready for the interviews Many people have done that sheet, you can check out that too. The link is given in the description box So let's move ahead. You can see that I have solved around 270 problems. The number of questions does not matter here. I have done 60 easy questions, 150 medium and 40-50 hard. I have solved only 270 questions because I practiced a lot in CP, which helped me in improving my problem solving ability Here I solved questions of Binary tree, Binary search tree, Linked list, or interview specific questions from many topics like DP etc, because we don't use all these topics in CP, so I was not familiar with them. That is the reason that I have solved only 270 questions Now let's discuss, how to know which is the best solution for a particular problem Let's take this problem 'Colors' as an example. It is a very simple question According to the question, we are given with an array of 0,1,2 and we have to sort it If I simply use sort function here and submit it, you can see, here it is written 'Runs faster than 100% of CPP online submissions' But you don't have to rely on this, because if you are solving it using sort function, then you are not using its speciality of containing only 0,1,2 If you are a beginner and you see this statement (runs faster than 100%), then you will think that this is the correct solution and you will move on to the next question, but it is not correct You don't have to do like this. This is a very deviating factor here. Don't focus on this statement written over here Whenever you solve any question, try to analyze its time complexity Once you are done with it, go to solution section, even if it is locked, you need not to buy leetcode premium, you can directly move on to the discuss forum And then click on 'Most votes' Then open the first 4-5 solutions for this problem. Let's say I opened the first one, I got a solution there if I didn't understand that solution, I can read comments here and their replies. I always do like this so that I can get the intuition behind the question Sometime I need very short code, so I check for such solution like 'Short Python code in 10 lines or CPP code in 5 lines'. This wasy, I get the compact and most efficient solution for a problem I have already made a video on this solution. If you solve this using sort function, your time complexity will be O(logn), but its efficient solution is O(n) So the important thing to note here is, you always have to analyze the time complexity of your solution and then look for the better solution 2nd thing is, whenever you solve any question, check its like and dislike ratio Try to avoid the question with too many dislikes and solve only those, which have good like-dislike ratio Till now we have discussed, what/how we have to practice, how to see the solution and how to not get deviated Now we will discuss, what we should do, so that people should appreciate our leetcode profile The first thing is, we have to be regular and consistent When I say consitent, that means you have to solve questions daily for 6-7 months, if you are not active on any other coding website Also, you don't have to solve only easy problems, solve medium as well as hard problems too This is the first thing which people see when they you ask them for referrals The next thing is, it is not like you have to solve only 100 questions. Solve 250-300 questions. Some people even solve 450-500 questions I will suggest that you should atleast solve 300-350 questions. Also, solve quality problems. You need not to solve too many easy problems If the question quality will be high, you will learn more as compared to easy problems 2nd thing is, leetcode conducts weekly/monthly coding challenge. Try to give that contest This will provide you the enviroment of coding rounds because you have to solve the questions within a time limit In this way you will be prepared for the coding rounds of companies like Amazon, Microsoft, Adobe, etc because the level of the questions asked in these companies is not so high. I am not talking about Codenation, Directi, Tower research here So you can practice in these contests for practice as well as for improving your profile Make sure that after the contest, you check out the best possible solution in discuss forum Even if your solution got submitted, still you should check out other best solutions Best here means, best in terms of time complexity. In this way if you do 300-350 questions and approach someone who has not done CP, he will think about your profile for sure and may also refer you If you will ask for referral from a CP guy, he may not be satisfied with your leetcode profile, so make sure you ask for a referral from someone who has done leetcode and not CP, this way you will have high chances of getting a referral I have given all the advices for leetcode. If you follow these, you can make the best use of leetcode With this, I would like to end this video. I hope you all would have liked my hindi It is not that much good. Tell me about it in the comment section With this let's wrap up the video, if you are new to the channel and haven't subscribed, then make sure you do that because I am going to upload a video every sunday. And incase you don't know about my second channel, you can check out that because I have uploaded many tutorials to DSA questions there So subscribe to the channel and press the bell icon. Will see you on next Sunday, Till then Bye bye.
Info
Channel: Striver
Views: 88,120
Rating: 4.9493842 out of 5
Keywords: leetcode, placements, takeuforward, striver, dsa, interview preparation, computer science
Id: yf_68nHyjZc
Channel Id: undefined
Length: 13min 38sec (818 seconds)
Published: Sat May 01 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.