How to Start Leetcode in 2024 (as a beginner)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
having solved more than 1500 lead code problems and having cleared interviews at companies like Amazon Google and Microsoft there are things I have learned that I want to share with you in this video to make your journey easier and less painful today I will explain how I would use lead code if I were starting from scratch I will answer most common questions people have while starting their lead code journey and say resources you can use to become more productive while practicing question why do I even need to do lead code can't I get a software development job without lead code well the answer is yes you can and get a software development job without lead code there are many startups that don't ask these type of questions but if your goal is to work at Big tech companies like Amazon Google or Microsoft you would need to practice on lead code since it's the best platform to prepare for their interviews question which programming language I should use for lead code and interviews many people get confused when deciding which programming language to use well there is no right programming language as long as it's a popular one like C++ Java python or JavaScript if you're new to coding and don't know any programming language I would recommend going with python since it's easy to get started with and has a simple syntax if you already know a programming language well stick with it you don't need to be an expert but you should understand basic syntax and Concepts like Loops conditional functions and basic input and output operations most programming languages come with inbu support for common data structure and libraries for example the STL in C++ and the collect library in Java so you spend some time learning these it will make your journey a lot easier question does choice of programming language matter in big Tech interviews the answer is no as long as it's a well-known programming language the reason it doesn't matter is because a programming language is just a tool and you can solve the same problem using multiple programm languages I started using C++ in the beginning then switched to Python and finally to Java since most of my industry experience was in Java question I am new to data structures and algorithms how do I learn this before solving your first lead quote problem you should have some idea about computer science fundamentals such as time and space complexity as well as basic data structures and algorithms you don't need to go very deep since most of the learning will happen while solving coding challenges but make sure you are familiar with how to calculate time and space complexity of an algorithm using big or notation learning big on notation will help you improve your algorithms and better understand why your algorithm may be running slowly once you have a grasp of big on notation familiarize yourself with fundamental data structures like arrays strings binary trees link list St Stacks cues and hashmap and learn basic algorithms such as sting searching and recursion you don't need to know advanced concepts but it's important to know how to implement basic concepts in your preferred programming language to learn these topics you can find many resources online one YouTube channel that I found particularly helpful for learning data structures is William faet they have a data structure playlist where important data structures are explained visually if you like reading books then I recommend reading data structures and algorithms Made Easy by narima kumachi and cracking the coding interview by gay lakman McDow question there are thousands of problems on lead code which ones to solve if you a beginner start by solving problems by topic this approach will help you gain a deeper understanding of each topic and learn F data structure or algorithm to use for a specific problem for each Topic start with easy problems once you can comfortably solve easy ones slowly start challenging yourself with problems which are slightly outside your comfort zone you must constantly challenge yourself to get better don't worry about hard problems in the beginning in most interviews you will encounter medium level problems so Focus most of your time on those the types of problems ask in interviews differs from company to company and it depends on the role you are interviewing for in general backend roles tend to ask harder questions compared to front roles and Fang companies ask more difficult questions compared to startups for senior roles experience and system design matter more than lead code questions if you already have some experience with lead code or similar platforms you can choose curated list of problems like need Cod 75 or top 100 lik or top interview 150 questions on lead code don't spend too much time on highly disliked questions they will drain your energy and demotivate you sometimes you may come across a problem that is tagged as easy but it still proves to be difficult to solve don't get discouraged this is all part of the learning process and sometimes lead code doesn't do a good job of classifying the difficulty level of the problem avoid jumping between problems too quickly give each problem sufficient time and effort after every problem you solve ask yourself what is one thing knowing which made everything else easier question how many problems should I solve this is subjective and depends on the level at which you are at if you are new you would need to solve more problems in general 300 to 400 problems should be good enough a mistake I made in the beginning was rushing to increase my problem count without spending enough time on each problem instead of focusing on the quantity of problems you solve focus on what you learn from each problem it is much better to thoroughly understand and solve 20 problems than to solve 100 problems without much understanding also try to make it fun there's a fun in learning to solve coding challenges it's not just about getting a job I was able to solve such a high number of problems because I enjoyed challenging myself and felt excited whenever my solution was accepted question how do I approach a new problem take some time to understand the problem statement and the expected in input and output patterns write it down on paper if it helps start with brute for solution and then work on optimizing it think about how you can improve the algorithm or reduce the time and space complexity plan your approach before coding coding is easy Once you know what you are going to write so before writing a single line of code make sure you understand what exactly you are going to write that's one reason why programming language doesn't matter much because it doesn't take too long to implement a solution once you have a good idea on what to write develop the habit of analyzing the time and space complexity of every problem you submit interviewers focus a lot on finding Optimal Solutions and may ask about the complexity of your code it is a good practice to test your code with a small inputs including edge cases question if I'm stuck with a problem when should I look at the solution give at least 30 to 60 Minutes of focused effort to a problem if you still stuck look at hints and solutions don't spit too long on one problem read the official solution and try to understand the top Ed Solutions you can check out this extension called lead code video Solutions which allows you to watch solution videos directly on the problem page don't just move on after being the solution try to implement it yourself also since you were to solve this problem on your first attempt it's a good idea to market for revision and revisit this problem after a few weeks question how do I solve more problems in less time the answer is to learn patterns instead of focusing on individual questions concentrate on identifying patterns on lead code you will come across multiple problems that follow a similar pattern once you know how to to solve one of them you can apply the same approach to solve others for example after learning this serving pattern I was able to successfully solve more than 20 sting questions using the same approach I have created this GitHub repository to list common lead quote patterns from different articles you can find the link in the description question should I memorize solution to difficult problems when I was a beginner I used to memorize the solution to the difficult problems and move on I later realized that it was a big mistake memorizing Solutions does not improve your problem solving skills and it is not helpful during interviews because the interviewer might ask a variant of the problem or a follow-up question inform is a retain Pro understanding is more likely to stay with you long term during interviews it is important to explain your thought process if you have only memorized the solution you may struggle to convince the interviewer why your solution will work question how do I practice like I am in an interview solving a problem during an interview is very different from solving it at home sitting at your sofa that's why you need to practice in a timed environment there is a lead code extension called lead code timer that you can use to time yourself while practicing I highly recommend participating in lead code contest as they provide the best way to practice in a timed environment don't worry if you struggle to solve even one problem in the beginning the whole point is to gain some experience solving problems within a time limit when I started giving contest I was able to solve only one to two problems but with more practice I was able to solve three problems and sometimes even all of them question do I need lead code premium if you are just starting out you don't need to purchase lead code premium there are three main benefits you get as a premium Member First is you can unlock premium only problems second you can access the company specific problems and the third you can access Visual solution to some of the problems but all of these you can find easily online for free if you need visual explanation of any problem simply type lead code on YouTube followed by the problem number no matter what problem it is you will find plenty of high quality videos explaining its solution if you want to learn more about my coding journey and how I went from zero to cracking interviews at multiple big tech companies you can check out this video if you have any questions or want me to make a video on another topic let me know in the comments I wish you all the best thanks for watching and I will see you in the next video
Info
Channel: Ashish Pratap Singh
Views: 110,003
Rating: undefined out of 5
Keywords: leetcode, how to start leetcode, how to use leetcode, how to use leetcode effectively, neetcode, how to use leetcode for interview preparation, coding interviews, software engineer, coding interview, data structures, algorithms, dsa, data structures and algorithms
Id: Nx4bvwU0DqE
Channel Id: undefined
Length: 8min 44sec (524 seconds)
Published: Mon Dec 11 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.