LeetCode Isnt Real | Prime Reacts

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay the leite code fallacy okay I do want to watch this I do want to watch this just improve your problem solving skills and you'll be able to pass all your coding interviews just solve some link lless questions over here and some tree questions over there and then you'll be able to derive the edit distance algorithm yourself just like this Soviet mathematician did in the 1960s if that sounds ridiculous to you it's because it is let me tell you a little secret you're not supposed to figure it out yourself did you ever watch that episode of Naruto where the the exam is intentionally designed to be so difficult that the only way to pass is to cheat well that's the modern coding interview in a nutshell let I've done a lot of interviews and I've never experienced a question that was completely out of of left field to where I have to you know derive the edit distance right well let him cook no because I I'm I'm addressing his first point you can't just let somebody cook when they say that you can't just say they can't ju Nico can't just say that interviews contain impossible questions in which only people with phds solved by deriving them and then come back and say no you can't talk about that of course I can talk about that okay like I don't think all interview questions are good here's the deal I don't think let's see would you discover Dyer's algorithm by yourself to use it in an interview I know dyra algorithm I've memorized it and here's the deal if someone asks you dy's algorithm and you've memorized it nice free free chicken din that no that's not cheated that that is literally the opposite of not cheating that's called being prepared for an exam if you think that's cheating I think you're dumb I don't know how else to call it other than that's dumb second off I don't think asking dyra algorithm would tell you anything about the candidate like literally it would tell you nothing about the candidate you wouldn't know if the person's good or bad at coding or anything the only thing it would tell you is that the person knows Dyer's algorithm that's it yeah tell that to Google well guess what I've studied at Google I've had a job offer at Google and I was not asked Dyer's algorithm I was asked how would you implement a CSS selector let's just go over the base cases that's a practical ass question buddy okay that question is like how do you like how do you do uh query select all or select quer query select all whatever it is query selector and query selector all like that's a great question that is a great question to ask because it's very very simple how do you walk a tree how do you find stuff how do you do an if you know condition what do you think why would you do it why would you why should you start at the leaves as opposed to the top right we could have talks we could talk about it that was my Google interview question there's a couple all of them forgettable but they're all along that kind of order practical questions right I think people have these weird Twitter takes about what a coding interview is now I do agree there are some people that actually ask dumb questions one time on my Google interview 12 years back 13 years back I was asked how to do a binary search now luckily binary searches also very very easy I destroyed binary binary search yes I got I got offered a job at Google I said no I got offered a job at Google and I said awesome what's the offer and they said okay it's 10% less than your current pay but it's a starting point and I said that is a starting point behind my current point I don't know why I'm doing this hand motion it's just when somebody says it's a starting point in a very insulting way it makes me think of whatever the girl's name is the daughter's name is off of shits Creek that's all I think about it's a starting point it's just like yeah you're right that is a starting point but it's a jerk starting point and I don't want your crappy starting point Alexis there you go it's such an Alexis move you know it's it's a starting point did they ask you to use dyras I love [ __ ] it's a great I I love the first couple Seasons I thought the first couple seasons was absolutely fantastic for those that don't know how to do Dy res it's actually pretty simple okay all you do is you just have like a list of distances right those usually involve zero through whatever and you set them all to Infinity except for your Source not node you set that one to zero and then you can use Like A Min Heap right here and then you grab uh then you can grab the distance you grab the first one the smallest distance boom then you start at a and then you Rego through and compute all the edges and if it's lower you update each one of the edges so therefore long as a is attached to something you then update each one of these Let's Pretend This is B now it went from Infinity to uh three and then again you just go through the list you find the minimum one bada bing bada boom then you do that again and you just keep on doing it all the way to the end and it creates a beautiful beautiful beautiful graph with all the minimum distances to travel to every node starting from a now do AAR AAR I actually don't know I know AAR is a for AAR and D are are both breath for searches but I actually don't know AAR and by the way if someone also uh uh ask me a star I would say I don't want to I don't want to work here honestly if someone asked me Dy R for part of my interview I would say I don't want to work here like why would I want to work at a place where your gatekeep is you asking an algorithm that has a definite answer there is like there is a right answer and then there's no answer like that's it there's no there's one answer to dyes there's one answer to quicksort in fact quicksort is so hilariously bad among many devs that when you walk in here you're walking you do quick sort with numbers and you do this in JavaScript and you let co-pilot Solve IT guess what co-pilot didn't even solve quicksort this isn't quicksort it looks like quicksort it has all the versions of quick swort it is almost quicksort but it's copy arrays it's not even quicksort it's like merge sort with a pivot it just [ __ ] pisses me off co-pilot can't even pass this stupid question let me tell you what I mean all right anyways hey by the way just so everybody knows I actually think n code is absolutely fantastic you should definitely go this is like my second video I think I've watched of niod very amazing Creator you should definitely go subscribe to his Channel all right we all learned long multiplication as kids we all memorized this algorithm to get the product I learned long multiplication you know what I'm talking about girl of these two numbers First We Take 2 * 5 that's 10 the one is carried then we do 2 * 5 over here that's 10 again we remember we carried the one so it's actually 11 on the second row but before we have the Z and then we say 3 * 5 that's 15 we say * 5 once again that's 15 so this becomes 16 take these two add them together we get 1760 now I know what you're thinking this is just math how is it relevant to leak code but please just hear me out most people don't care enough to ask why does this work they don't care enough to notice that this is the same as writing it out like this but this is a hard problem so let's make it easier this is really just 5 + 50 this is really just 2 + 30 the man's about the foil can we be real here for a second we're about the foil expanding it out taking two times this part we get this taking 30 times this part we get this and this part over here you can notice is going to be 10 + 100 this part over here I'm actually going to rewrite it I'm going to make it even more simple why not 30 that's too big I'd rather have 10 * 3 and then multiply that by 5 + 50 so now just focusing on this part over here this is the man's double foiling going to be equal to 15 + 150 and so this become by the can we take one quick can we take one quick moment here the man is such a gigachad he has a video on leak code fallacy that's 6 minutes long and spends a minute and a half giving us a giving us a a quick multiplication breakdown okay this is so good this is so good because it is just like this is going to be a great Checkmate moment I'm I'm so excited for the Checkmate Checkmate me Daddy comes 110 which look it looks pretty familiar over here this becomes 165 5 which looks to me like we had that over here and now it becomes clear why we add a zero over here doesn't it it becomes pretty clear cuz we just take the 10 out of the 30 over here this isn't really three times these numbers we just took a shortcut to make it simple for us and then at the end We'll add that 10 so just like now I'm going to add 10 I'm going to add a zero here this is 16 wait did did are there some people in chat right now that haven't just thought about how this stuff works what I'm learning right now is that chat just simply followed instructions their whole life and they haven't thought about things this is just this is W welcome to math 50 and now this is just addition I took multiplication and turned it into an addition problem this is called problem solving and now that I've gone through this I have at least a chance of discovering long division on my own have you noticed that some people are naturally better at leak Cod or just learn faster than others well usually those people come from another highly technical background like math and they probably already built a lot of problem solving skills that can be applied to computer science it makes sense why a mathematician would have an advantage over say a farmer for example so what I don't know if that's true I'm not 100% sold on that I will say one thing okay hold on before everyone loses their [ __ ] I will say one thing about math that I particularly loved and it's why I really enjoyed doing like say la PL transforms and all that stuff it's why I was number one number one when it came to uh differential equations number one at my university only person to finish the final got the highest grade screwed everybody else F you couch that's what happens stop sucking sucks to suck sucks to be number two and blow right absolutely destroy them and part of the reason why is that I loved going through and being able to do all all these kind of things it was just fun I enjoyed it give me that salty brine solution baby I was in on it you know what I mean and the thing about solving these is that there's like a base algorithm for solving anything right uh inverse trig substitution isn't is is just an algorithm but to be able to apply it and recognize when a problem needs to have inverse trig substitution becomes an AR become something that you have to start recognizing you get an intuition about certain sets of problems that just simply are better for some uh for some strategies versus other strategies and you start to develop this kind of like um ability to look at something and say okay we need to use this type of operation we need to look at this we need to use this uh uh operation and we need to do this and really that is computer science and that's the experience that's what an experienced software engineer is is the ability somebody who's inverse trig substituted 900 times and now when they see a problem they can go this is a trig inverse substitution problem I can do something out of my bat belt or whatever you want to call it my back pockets is what's what's in those pockets is uh you can take that out and you know how to solve this particular problem it doesn't have to match exactly you may have never seen the problem but you have a general feeling of how to solve this problem just due to that flashbacks to arang flashbacks to aosh where's my Kos boys at uh where's my telephone wires at um and so I I do find I do personally find that math is really really really really like helpful right the practice of math can build an experience of problem solving despite it's really just an application of algorithms if that makes sense now I'm not saying you can't be and so could someone like on average if you had a pool of people who have gone through and have a bachelor's in in math and you have a bunch of people who are just Farmers which one would likely learn programming easier and which one would be more useful in probably one year now you probably can't say which one would be the best you can't you can't say which one's going to be the best out the group who's going to be the best programmer because I don't think you can uh a lot of people are saying farmers and a good argument would be that farmers have the ability to work hard for much longer hours when they hear oh you can only work for six hours the farmers are going to kick their asses okay CU they're like you only work for six hours yo dog we work from From Dusk Till Dawn on some nights have you ever done an all nighter buddy have you ever done potato farming by the Light I don't think you have okay math math you guys a bunch of weak ass people can't even stick on a pencil that long right um and so yeah one could argue that maybe a different set of skills are trained as a farmer but nonetheless if you had two pools I would put my money on the people who graduated with math degrees over Farmers for the first six months now if you're going to say in the first two years I actually think I'd invert it and I'd put my money on the farmer what about 3 years it's two years and Beyond I would absolutely bet I'd absolutely bet on the farmers over the mathematicians uh resiliency matters in the short term I don't think you can just simply adjust your brain fast enough to become an amazing programmer so I think it just takes time so therefore the you know I I I'm one of those people that you know there's a lot of people especially in the coastal Elite areas where they look they effectively look down on everybody okay I'm not one of those people I don't look down on everybody I actually think um I actually think that most people can become quite awesome at stuff like very few people are actually too stupid to learn something uh but a lot of people like you see it a lot that there's like the dumb people in the middle of the country and the smart people on the on the coasts no I I I I I don't think that the flyover states right and this is a very American take by the way for those that aren't in America I'm sure you have a version of this that exists right I am positive you have something uh that is that is out there that that you have oh people from this location are stupider because of I don't know you know what I mean you don't look down on people because you are from Montana well I mean I'm I'm on the North Coast so I'm always looking down okay everything South uh there are no stupid people yes there are stupid people there are there are variations in abilities PE in brains of course there is there's variations in all sorts of bodily characteristics of course there'd be variations in people's ability to learn learning rate and all that kind of stuff of course that exists anyone who anyone who's had enough kids can tell you for a fact some kids just get it some kids just don't get it it doesn't come down to funding it doesn't come down to opportunity some kids are just going to be naturally more gifted in certain areas than other kids that's just completely normal even in my own family I can tell you some of my kids just simply get it faster than other of my kids doesn't mean they're stupid it just simply means that this type of learning isn't where they excel at right I I hate to tell you this but people that this this idea there is nothing more annoying in the universe than people who think there aren't truly gifted people or there's not dumb people of course there's going to be somebody that doesn't have the same intellect intellectual capacity like you can't tell me that every single possible physical variation exists in the body and then all the sudden out of nowhere no no variation in the brain you're like yeah okay of course there's going to be variations like dude I have small ass I am 6 feet tall and my hands are the same size as my wife that doesn't make any sense I'm 6 in taller than her I don't even have a neck what the hell happened to my neck it's gone where did it go look at that I got like two inches here people it is unfair neck privilege is real dude if I had a neck I'd be like 62 63 it would have been awesome instead I'm just like I don't even get a neck okay Donald Trump hands necklace and maybe I'm good with math okay is that is that like is that the tradeoff I wanted to make probably not the trade-off I wanted to make you know if I could have had a choice I'd probably would have still chosen imagine how blazing fast you'd be at V with bigger hands I know imagine I wouldn't have to be move my hands all over the keyboard just to touch all the buttons you know what I mean that was your deal with the devil um L on the character creation character creation I dude great stat picking terrible character creation terrible I was very bad at the UI very very bad at it anyways I'm not exactly sure um again I I I fundamentally do not believe this stat at all because either you are directly insulting several of my kids or B not everyone is gifted the same way absolutely baloney absolutely baloney Absol like first off anytime I see someone just throw out a stat I think it's stupid second off psychological Studies have the greatest inability to be consistent over generation to generation right like that is actually a true problem with psychological studies right now is that they have an incredible inconsistency of result problems and so for me to hear somebody being like well guess what it actually just said that 90% of kids are really smart so what happened why are you societally damaging your kid it's like you know what that's a that's a [ __ ] up take maybe you know it' be a lot better to realize that not everybody's going to excel the same way some kids just struggle sitting in a class listening to someone talk some kids do absolutely fantastic with that some kids just get math you don't have to explain it to them you don't have to do it they just get it it just comes in comes out they got it some kids struggle with reading like dude a couple of my kids just struggle with reading comparatively to the other ones if you think every kid comes out as a genius then I expect every kid to come out as a good singer I expect everybody here to go beyond uh America Got Talent and I want to hear some good ass singing from all of you because Society has made your voice bad and I want you to um I want you to to realize society's holding down your voice and it's time for you to sing my little butterflies it's time for you to fly free can you do to give yourself an advantage don't focus on extremes if you try to memorize solutions for every single problem which is not easy by the way you'll never be able to solve a new problem if you I mean I I I don't technically like that take but I see what he's saying by the way you shouldn't memorize a solution memorize the walk you know how easy it is to walk a path it's it's really easy right like right now I don't think I could write successfully dyras easily but I could tell you how to do dyras I would have to re-remember how to do it it's because I've memorized the walk I haven't memorized every single step right and it's just like learn to memorize the important parts and how to apply them you just simply don't have to memorize every last line of code people that memorize code you crazy what is this memorize the walk uh have you ever do do you have a hike you like does it have like one or two forks in the road do you have to like do you have to like really think about okay I better remember to make this turn no the turn is just natural it's a part of the walk you just kind of go with it it was very easy to remember because you didn't have to like you didn't you didn't memorize every single step of the way you didn't have to go okay after 472 steps I'm going to have to make sure that I Veer right because if I do not Veer right I'm going to I'm going to fall off the cliff because it actually also gently turns right no your brain just does it all for you it's very very simple the walk is super easy nobody thinks about the walk it's just a hike you just know how to get to the base of the hike and you know where the hike ends right you don't have to memorize all the steps and that's why I do dyr D is really easy because dyes is it's just like I I can remember that never look at the solution for a problem you'll spend 10 hours on a single problem and still won't be able to figure it out in my opinion there is an intersection between memorizing and problem solving you need a a little bit of both if you're going to memorize anything please please memorize the DFS algorithm it's the single most important algorithm in coding interviews ooh that's an interesting one is DFS the most important or is BFS the most important one's a q one's a stack dyras is a BFS it's not a DFS on a uniform weight graph BFS is how you find the shortest path to an endpoint not the most efficient but that's how you do it it's just interesting memorize the core CS algorithms like binary search the sliding window technique and when you get super familiar with these core skills you realize that most leak code problems are just about identifying which core algorithm to use and then applying it to the specific problem I feel like I've said this 9,000 times in this dum stream stop like I that's thank you NE coat let's go just be good at data structures and algorithms stop being a leite code champ again the only reason why I say leak code can be very very beneficial is if you do the array problems because the array problems are a unique set of problems that are going to be just you manipulating data in an array and that it's very very hard to get good at unless if you just do it right you just have to do it right do the cityscape problem it's it's hard it's it's annoying it's tedious but doing it a bunch will just make you good at using a race which can be very helpful in in an interview and it can also be helpful in real life so I really do like those problems because they're just so delicious you know what I mean they're very very delicious in other words in terms of coding interviews problem solving is by the way someone said uh be good at this [ __ ] and stop crying about how hard it is I I you know I I I I know you're just like being extreme but there's so many people that have this kind of mentality that just like oh you're just saying all these no no no no no no no spending 3 months to get good at something when you're planning on doing something for 26 years for 30 years what do you mean of course it takes time do it it takes a while you can't just get there if you honestly like real talk if you think like this right here pun uh again you're just emphasizing how stupid this is if you think that you should just know these and this should be easy to do you're an idiot it's not easy to do this is the reason why it gets paid so much is because it's not easy to do it takes a long ass time to get good at something if anyone can do it at it's not easy for AI I literally just showed you AI producing not quicksort and calling it quick sort it's not easy for AI either soon soon just trust me trust me bro go live in your retro futurism for a while my friend go off and I want you to go look at all of the times in which people have promised all these things and realize it is not going to happen as fast as you think it is okay soon trademark okay soon so soon don't you worry I hate I hate those Tak it's just so annoying stop with just if you think a okay honestly Real Talk H real talk if you think AI is going to be uh taking Yuri if you think AI is going to be taking over it you should stop programming and only use chat GPT you better get really good at printing okay you should get really really good at pring and you should quit learning data structures and algorithms quit learning anything you should quit learning all the things because honestly if you really think that then lean in right if you re do you believe what you really believe is really real then act like it it's all about pattern recognition a reasonable approach to coding interviews would be to First learn the core algorithms needed it's fine to look at Solutions you're in the learning phase just like an ml model you're taking in training data after that you should try to apply your knowledge if you were able to derive the solution to all these problems by yourself it would grow greatly improve your problem solving skills o coin change this one is a difficult one dynamic programming is by far one of the hardest concepts of all time dynamic programming is sometimes used but man is it difficult coin change is so hard every time I do it if I don't practice dynamic programming and solve problems regularly I forget how to do it there's like a secer to it and I know it involves going up and back but it's just like okay what's what's the thing what's the one it's just so particular it's very very hard coin change what's coin change I actually do coin change live in an algorithms video that I made I've have coin changed hard okay I've coin changed with the best of them but it's also very very very difficult but that's obviously not realistic but consider this if you're trying to figure out the edit distance algorithm you would have a much better chance of doing so if you first solved the longest common subsequence problem because it has significant overlap and of course that's not something you realize until you've actually solved these problems which is kind of why I've organized them in this list you don't have to have already solved the problems to make that connection by the way this is n code. there's a ton of free resources on it so check it out if you want to support me and gain access to an Ever growing amount of content you can do so by getting a pro membership thanks for watching and I'll see you soon Go Get It Go Get It you weak people go get it and learn something then maybe watch a little bit of asmin milk go get it hashtag yeah hey I love by the way I love ads like that real talk I love ads like that because it is something he made right it's something he made that is his and he is doing his own ad he is self proing himself up he made great points within this video there's things I really liked about it and so I absolutely love it okay I absolutely love love it you should support him for that kind of stuff cuz here's the deal with that kind with with those kind of things is that he's building something that makes you potentially better at potentially interviewing right and that is your whole goal is to get in there learn the secret handshake do all that slapping that you have to do and bada bing bada boom there we go right and so of course I absolutely support that and I think you should go do it go do it oh me and my homies love need hell yeah hell yeah all right hey the name I still think farmers will outperform mathematicians in the long run a genen
Info
Channel: ThePrimeTime
Views: 167,400
Rating: undefined out of 5
Keywords: programming, software engineer, software engineering, developer, web design, web development, programmer humor
Id: NEWE1HAaUHs
Channel Id: undefined
Length: 29min 4sec (1744 seconds)
Published: Thu Mar 28 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.