How To Prepare For Coding Interviews Efficiently

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
is there another industry where job candidates regularly spend months studying for interviews where the interview questions are almost entirely unrelated to the actual job i'm actually curious like are doctors tested on obscure biology topics when they apply for jobs anyways regardless of opinions on the system it's the one we have to live with so in this video i'm going to share how i prepared for my software engineering interviews and how i'd recommend you study for yours as well now i do need to quickly address my own bias i've spent the last 10 or so months working for the coding interview prep company algo expert but don't worry too much i'll try to approach things from a fairly objective perspective and i'll share my process before i ever join algo expert i might even mention a few of algo experts competitors in this video just don't tell clement okay and through this work i've also had a lot of you all share your interview experiences with me so hopefully that will let me approach my study plan from a fairly unique perspective okay so first and foremost there are some prerequisites that we should discuss for one before you start preparing for coding interviews you need to be fairly proficient in coding this doesn't mean that you need to be an expert but basic topics like functions and loops should be pretty much second nature for the purpose of this video i'll assume that you're already at that point but let me know if you'd be interested in my advice for actually learning to code because i think that's an entirely different topic that could be another video now assuming you know how to code you'll want to have some level of proficiency in data structures as well a major component of most interview questions is choosing the right data structures for the problem so naturally you'll want to be comfortable with all the major ones particularly i would make sure to be comfortable with strings arrays maps sets stacks cues linked lists trees and that includes different types of trees such as tries heaps red black trees etc and graphs and i think that's all the ones i wanted to mention for each of these data structures you'll want to make sure that you know how to use them in your preferred programming language and as a quick aside here don't overthink what language to do interviews in just choose the language you're most comfortable with with maybe one exception of avoiding super verbose languages like c just because that would make the interviews more difficult for yourself if you don't feel comfortable with data structures or you just want a refresher there are plenty of options for learning them if you're a university student your school likely has a data structures course so that's probably the best place to start otherwise there are a ton of courses out there on the internet if you want something free there are plenty of great videos on youtube just go back to the list i gave a moment ago and watch a video on each one try to find videos that focus on conceptual overviews first and if there are coding examples of course it's preferable that it would be in whatever language you're choosing for interviews but that actually isn't too important as long as you can understand the code there are also some great written resources out there such as geeks for geeks i'll link to some of my favorite down in the description and if you prefer paid courses of course there are some great options out there as well algo expert does come with a data structures crash course and there are some other courses out there dedicated to just data structures if you choose to go this route just make sure to find one with good reviews and from an instructor that you trust now once you become comfortable with data structures you'll also want to understand complexity analysis and big-o notation essentially this is just a mathematical way of classifying algorithms based on their efficiency particularly with how much time and space they use this is something you'll get much better at with practice so don't stress about it too much from the beginning just make sure you understand the high level concepts and most of the data structures resources have information on this anyways so it shouldn't be too difficult to find good material to learn from and as you learn complexity analysis the one thing you want to memorize is the time and space complexity for each major operation of each data structure for example accessing an element at a given index in an array is a constant time operation whereas the same operation in a linked list is a linear operation meaning that it's just much slower this will be super important in choosing the right data structures to solve problems and luckily it isn't actually that hard to memorize as there just aren't nearly as many options as you would think i'll link to some cheat sheets in the description feel free to use those as you practice and just slowly work towards not needing the cheat sheet at all okay so we are pretty far into this video and i haven't once mentioned specific problems or how to solve them and that is actually intentional one of the biggest mistakes i see people make is they become obsessed with solving as many problems as possible or as many problems as their friend and fang claims to have solved but they lack fundamentals and those fundamentals would help them solve problems more efficiently but of course you do still need to practice so assuming you've got these prerequisites down here's how i would start practicing on actual problems first you need to choose a platform or platforms to practice on when i was studying i used a mixture of leak code and algo expert so yes i did actually purchase algo expert long before joining the company but if you are touring about purchasing a premium product like algo expert then i'd say to give the free problems a try and use those as a decision maker for if you want to buy it in my case i realized that if buying algo expert meant i would get a job that paid one percent more it was going to pay for itself multiple times over and for my learning style i thought it was helpful so it was a no-brainer to go ahead and buy it but of course make the decision that is best for you and now for solving actual questions this is where i think most mistakes are made i see many people get obsessed with numbers like i need to solve 500 questions or i will never get a job as a software engineer i can confidently tell you that's not true the goal here should not be to solve so many problems that it becomes likely you will see some question in an interview that you have a memorized solution to the goal should be to get to a point where you can confidently solve questions that you have never seen before for some this might take more practice than others but i think i've got it down to a really efficient way to practice first choose a good problem if you're using a free product try to find problems with high like ratios otherwise you might end up wasting your time on poorly written prompts or test cases that are inconsistent with those prompts with the more premium products you shouldn't need to worry about this too much but you still want to carefully choose categories of problems to begin with i would focus mostly on questions marked as easy or medium then slowly work your way up to harder questions but really a lot of the hard problems are well beyond what would be expected in an interview without hints from the interviewer so try not to stress about it too much additionally try to work on problems that will use different data structures to make sure that you are testing yourself on different concepts now once you start solving a problem treat it like a real interview in a real interview the interviewer isn't just going to bring you into some room link you to delete code and come back in 45 minutes they aren't there just to test if you can solve some arbitrary problem they are there to test your problem solving and communication skills so when you first get a problem start by thinking of one to two clarifying questions that you might want to ask a potential interviewer this is something that you should almost always do in an interview so it's important to get used to doing it next spend a few minutes verbally articulating how you would approach the problem describe things like the patterns you are recognizing and the data structures you are considering if you have a potential solution in mind describe the drawbacks to that solution and potentially its time complexity if you are able to come up with what you believe to be an optimal solution then start coding that out if you don't have an optimal solution try coding out a brute force solution i think sometimes we get caught up in trying to find the perfect solution but sometimes just finding any solution is a good place to start in fact even if you know a better solution i would recommend describing the brute force solution first this is a great way to show an interviewer that you are considering multiple options which is a great quality of a good software engineer and now as you are coding speak through the entire thing before writing a function or a major code block explain what you are about to write and then as you write each line of code explain what that line of code's purpose is and to be clear here you don't need to explain how coding or the language works but rather explain the purpose of the code in relation to solving the problem your interviewer doesn't need to know that you know what a for loop is but they do need to know why you chose to use a for loop in the way that you did now once you get to a solution go through some test cases and this does not mean just clicking the submit button because many interviews won't have a submit button at all in fact i don't think i've ever had a submit button in an interview for instance google famously uses google docs for many of their interviews so you don't get syntax highlighting or the ability to even run code so instead of jumping for that submit button come up with some test cases manually walk yourself through your code for a simple case as well as some edge cases such as an empty input do this for a few cases to convince yourself and the fictitious interviewer that you were practicing your solution for that your solution is correct from here describe the time and space complexity of your solution and explain why that is the case based on your code also as a small tip here when you say something like oven make sure to describe what in actually is sometimes it's obvious but in many cases it actually isn't okay but what about problems that you aren't able to solve they say you aren't learning if you aren't failing so as you start out i would expect that you can't solve very many problems and for these problems that you can't solve here's what i would do if you aren't able to make progress for more than 10 or 15 minutes look at the hints on the interview prep platform that you are using if it has them if you still can't solve it or there just weren't any hints then it's time to look at the solution but when you look at the solution focus on the conceptual overview of that solution as it's really easy to just look at the code and say oh yeah i get it when in reality you might not be able to fully articulate why that solution is correct additionally you don't want to get in the habit of memorizing correct code you want to be in the habit of memorizing and conceptualizing correct ideas so once you understand the solution just move on don't try to immediately code it instead what i like to do is come back one to two days later to try the problem again this allows you to verify that you actually understood the solution rather than just having stored it in short-term memory for a few minutes and from there just rinse and repeat again make sure you are focusing on ideas not just the number of problems you have solved additionally make sure you are emphasizing your ability to communicate even if it means you might feel a little bit crazy talking to your computer screen all the time
Info
Channel: Conner Ardman
Views: 52,577
Rating: undefined out of 5
Keywords: coding, software, engineering, software engineering, sde, swe, software development, development, web, web development, developer, tech, learn, learner, learning, frontend developer, career, facebook, meta, fb, interview, coding interview, leetcode, algoexpert, leetcoding, how to leetcode, how to study for coding interviews, technical, technical interview, data structures, algorithms, algorithm interview, how, to, how to pass coding interviews, software engineer interview prep, prep, prepare, google, faang
Id: 2nVFdxJJdLw
Channel Id: undefined
Length: 10min 44sec (644 seconds)
Published: Tue Jul 05 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.