LeetCode Isnt Real | Prime Reacts

Sdílet
Vložit
  • čas přidán 27. 03. 2024
  • Recorded live on twitch, GET IN
    / theprimeagen
    Become a backend engineer. Its my favorite site
    boot.dev/?promo=PRIMEYT
    This is also the best way to support me is to support yourself becoming a better backend engineer.
    Reviewed video: • The LeetCode Fallacy
    By: / @neetcode
    MY MAIN YT CHANNEL: Has well edited engineering videos
    / theprimeagen
    Discord
    / discord
    Have something for me to read or react to?: / theprimeagenreact
    Kinesis Advantage 360: bit.ly/Prime-Kinesis
    Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
    turso.tech/deeznuts
  • Věda a technologie

Komentáře • 527

  • @unusedTV
    @unusedTV Před 2 měsíci +1213

    I CHEAT ALL THE TIME, I MEMORIZED ENGLISH TO UNDERSTAND THE INTERVIEWER AND GOT AWAY WITH IT

    • @Dominik-K
      @Dominik-K Před 2 měsíci +68

      I memorized how to open the door to leave my home, memorized how to drive my car and then memorized to shake hands meeting the interviewer... On a pro-leet-level subconscious level

    • @adam.maqavoy
      @adam.maqavoy Před 2 měsíci +5

      @@Dominik-K I memeorized both at the age of 8.

    • @Lynxiro
      @Lynxiro Před 2 měsíci +8

      So true especially if you speak multiple languages. I have to "cheat" by learning how different consepts are translated into English and back.

    • @xtrct7303
      @xtrct7303 Před 2 měsíci +23

      You joke but there’s like a French Scrabble champion that doesn’t speak one bit of French.

    • @Lynxiro
      @Lynxiro Před 2 měsíci

      ​@@xtrct7303I guess for Scrabble you don't have to know grammar or what things mean. You just work off patterns.

  • @pluto8404
    @pluto8404 Před 2 měsíci +582

    I hate when they throw curve balls like "tell me about yourself". Darn gate keepers.

    • @Asto508
      @Asto508 Před 2 měsíci +13

      Just say it's in your CV. If they haven't bothered to read it, you can quit the interview anyway.

    • @Tobsson
      @Tobsson Před 2 měsíci +9

      Actually out of all the interviews I've done in my life, this is one of the hardest questions.

    • @mozartmemelord
      @mozartmemelord Před 2 měsíci +25

      "i hate programming"

    • @crisdebug8675
      @crisdebug8675 Před 2 měsíci +33

      The two hardest to me:
      Why do you want work here? idk , you guys pay and I need money
      Where do you imagine yourself in 5 years? bro I don't even know where I'm gonna be the next month, let alone in 5 years.

    • @nullyberd
      @nullyberd Před 2 měsíci +9

      is this really such a problem question? honestly seeing how some people react with such hostility to this question online seems like it's a pretty good way to filter out obnoxious arrogant twats who would be a nightmare to work with on a personal level alone

  • @NeetCode
    @NeetCode Před 2 měsíci +475

    LET HIM COOK 🍳

  • @mwwhited
    @mwwhited Před 2 měsíci +587

    Most coding jobs that include complex algorithm in the interview questions are for jobs that have nothing to do with complex algorithm.

    • @KevinJDildonik
      @KevinJDildonik Před 2 měsíci +60

      This. It's like making every single car mechanic be tested only on the intricacies of the wiring harness in the car's electrical system. You could work in a shop for 20 years and never have to fix a wiring harness. And when you need to, you just copy and paste someone else's work (replace the harness).
      We can argue all day about whether mechanics are better when they know this detail. But practically, the whole requirement is just a show because HR people don't know what they're doing so they're just copying someone else's work. Oh hey...

    • @hotrodhunk7389
      @hotrodhunk7389 Před 2 měsíci +16

      That's what I always wondered! Entry level front end JavaScript developer and they want me to solve some super complex sorting algorithm? Why wouldn't I just call quicksort and move on with my life?

    • @Tyler-lr6fq
      @Tyler-lr6fq Před 2 měsíci +12

      But most leetcode problems aren’t “complex algorithm” questions. They’re usually applying baseline concepts or fundamental algorithms to solve a problem.
      If you can recognize and apply design patterns and architectural solutions to problems, basic algorithms should be something you can already do or learn very quickly

    • @abeidiot
      @abeidiot Před 2 měsíci

      when the pool of candidates already has so many people, why not get the one who performs the best. It's not like being able to solve a question is a disadvantage

    • @innocentsmith6091
      @innocentsmith6091 Před 2 měsíci

      ​@@hotrodhunk7389Because hiring managers don't know or can't anticipate what sort of coding you will actually do, so they just give to something hard as a proxy for skill.

  • @austinbachurski7906
    @austinbachurski7906 Před 2 měsíci +180

    The "Moral of the story, do math on a farm." chat killed me, lol.

    • @user-os4lj3pi4q
      @user-os4lj3pi4q Před 2 měsíci +11

      I'm a mathematician and I disagree. He compares bootcamp vs learning programming at college. The summary is, in math, engineering is a bootcamp and BSc in math is college. I understand that he doesn't know real math (just like bootcamp people just know superficial stuff about programming). But he should know he comes from a very different context so he doesn't have all the information.

    • @austinbachurski7906
      @austinbachurski7906 Před 2 měsíci +7

      @@user-os4lj3pi4q Holy hell dude, laugh at a joke...

    • @user-ki1cc9uu4d
      @user-ki1cc9uu4d Před 2 měsíci +1

      ​@@user-os4lj3pi4q Or it is possible there's an ego or other intrinsic factor that is warping your perspective.

    • @Wasaby50312
      @Wasaby50312 Před 2 měsíci

      Shit are you alright now?

    • @SesterSinmon
      @SesterSinmon Před 3 dny

      🤣

  • @m4rt_
    @m4rt_ Před měsícem +41

    I like how my current workplace does coding interviews. They give you a project before your interview, and you work on a solution, and then present it at the interview.
    This is a more realistic way to measure how good someone is at doing stuff you would be doing at work. At work you won't be solving algorithm problems from your head, you'll work on a project, and have the ability to look at documentation, look online, etc.

    • @realwermos
      @realwermos Před měsícem +6

      The problem with this approach is when they use the interviewees as free labor

    • @rishisoni3386
      @rishisoni3386 Před měsícem

      @@realwermos yeah, but it has a potential reward too

  • @KevinJDildonik
    @KevinJDildonik Před 2 měsíci +304

    Skill you spend the most effort on in college software engineering: Calculus. Hardest test in interviews: Insanely specific domain knowledge and algorithms. 99.9% of programming jobs: Trying to slowly explain to a manager why what they're asking for is not only a logical contradiction, and impossible, but if it were possible it would be a terrible idea. There is close to 0 crossover between these domains.

    • @ValentinoFilipetto
      @ValentinoFilipetto Před 2 měsíci +4

      lol what kind of programming jobs do you guys have

    • @thebrahmnicboy
      @thebrahmnicboy Před 2 měsíci +11

      We generally learnt about Calculus in Year 1 and 2, and then we didn't touch it much for years 3 and 4, and the numerous techniques and formulae wither away in my mind with each passing day.
      Should have taken the optional course on Digital Signal And Image Processing in Year 3, it had more calculus.

    • @slurmworm666
      @slurmworm666 Před 2 měsíci +1

      ​@@thebrahmnicboyYeah DSP, ML and simulations. Lot of calculus in those

    • @smnomad9276
      @smnomad9276 Před 2 měsíci

      Yea and that is the problem.

    • @PhilipAlexanderHassialis
      @PhilipAlexanderHassialis Před 2 měsíci +7

      I 'll do you one better. Reach the point where your day to day job is fighting over budget, potential project scope expansions, writing documents (not strictly technical ones) and high level documentation for others to actually sit down, break it into tickets and then actually go ahead and implement shit. I am considered a "principal engineer" (whatever this means) in my current employment . The only coding I do is at the evening when I have the time and/or inclination to study - and this gets worse as time passes by.

  • @random_bit
    @random_bit Před 2 měsíci +136

    Prime ranting about the interview process without going through it recently is the biggest skill check ever.
    Go out there and interview randomly with not necessarily faang. Some people out there absolutely expect you to code a couple LC hards in less than an hour.

    • @kevwjin
      @kevwjin Před 2 měsíci +21

      here's a question that my friend got for a machine learning research engineer position:
      write a function that returns the *expected value* of the length of the shortest walk that traverses k randomly selected nodes in a tree with n nodes.
      still don't know how to code that question after 4 hours of thinking.

    • @random_bit
      @random_bit Před 2 měsíci +5

      @@kevwjin sorry they had to go through that, sucks that this is our reality :(

    • @OnFireByte
      @OnFireByte Před 2 měsíci +5

      It’s cursed of junior dev interview i guess. It’s make sense that he didn’t get that kind of question for senior position

    • @epicmoofish3726
      @epicmoofish3726 Před 2 měsíci +5

      @@kevwjinthis is not enough information to answer the question, we either need the tree or some kind of description of the amount of children that a given node has
      did the question clarify that each node was either at the bottom or had exactly 2 children?

    • @kiattim2100
      @kiattim2100 Před 2 měsíci +6

      ​@@OnFireByteeh, I think prime just forgot, there's usually 2-3 parts during technical interviews. It's LC, System design, practical question (depending on the position you apply for)

  • @likwidsage
    @likwidsage Před 2 měsíci +55

    Interviewing now and even 5 years ago is a day and night difference. I say this as someone that's been in the industry and now being involved the process.

    • @andyengle
      @andyengle Před 2 měsíci +9

      ☝🏼 This is the most accurate comment on this post.

    • @Dipj01
      @Dipj01 Před měsícem

      ​@elremolino707harder baby

  • @justanothercomment416
    @justanothercomment416 Před 2 měsíci +33

    I'm a very senior developer. If a company asks me to do these types of tests I will assume they are incompetent.

  • @Euphorya
    @Euphorya Před 2 měsíci +100

    I was a math major. At the higher levels, 90% of the time is spent just banging your head against the wall for days trying to understand abstract concepts. If that doesn't prepare you to become a good programmer I don't know what would.

    • @diasposangare1154
      @diasposangare1154 Před 2 měsíci +1

      I have problem with abstract things can you give me some advice

    • @VinceOfAllTrades
      @VinceOfAllTrades Před 2 měsíci +6

      I'll almost disagree. Most of my time in upper div math was spent doing proofs/derivations. Reinventing the wheel to arrive at the tool I actually want. In programming, I find myself constantly reinventing wheels and it's a big waste of time (especially when the wheel I invented wasn't as good as the one already there).

    • @BlueEyedSexyPants
      @BlueEyedSexyPants Před 2 měsíci

      Banging your head against any problem for days will put you on path to being fired. Management wants results, not excuses. It would make you a good programmer, just a homeless one.

    • @skyhappy
      @skyhappy Před 2 měsíci

      Programming is connected to reality. A large part of a math major is just imagining made up things. Whole other world

    • @jorgemells
      @jorgemells Před 2 měsíci +3

      ​@@VinceOfAllTrades I think he's referring to Prime's comparison to farmers where he said that because farmers work "harder", they're more likely to be better programmers.

  • @marlopainter8246
    @marlopainter8246 Před 2 měsíci +57

    “Never memorize something that you can look up.”
    ― Albert Einstein

    • @bchdev
      @bchdev Před měsícem +9

      "Hello"
      ― Albert Einstein

    • @SpazeOfficial
      @SpazeOfficial Před měsícem +3

      The entirety of C++

  • @georgehelyar
    @georgehelyar Před 2 měsíci +19

    When the company i work for got bought by a VC, the management consultants that took over for a while forced us to ask how a C# dictionary works internally, and solve a riddle about coloured balls.
    If someone chooses to implement their own dictionary instead of using the built in, i don't want to work with that person.
    Now we only do conversations in interviews and it works really well.

  • @theropoy9371
    @theropoy9371 Před 2 měsíci +53

    Primes first speech had nothing to do with the guys point😂

  • @noredine
    @noredine Před 2 měsíci +18

    One thing about kids "that just get it".
    I was one of them and I barely studied for anything if at all, as a result I never really learned how to study, which was a critical skill later in HS and After HS.
    I struggled, and I assume some like me did, too.

    • @SandraWantsCoke
      @SandraWantsCoke Před 2 měsíci +1

      Same. Turns out I was not challenged enough in school. I never had to learn math, never. I never prepared myself for exams. Then in college I realized there are some hard math problems out there.

  • @3rikMad
    @3rikMad Před 2 měsíci +10

    26:33 One thing I realized about dynamic programming that made it a lot easier was realizing you're just building a map of function inputs to outputs based on previously found mappings. When learning it, I think it would have been more obvious if I had been shown an example problem where you just recursively jam everything into a hash map with the keys being the input of the function and the values being the output of the function. Instead, I had to try to wrap my head around "optimal substructure," "loop invariants," and clever array manipulations before I could even understand what was going on. Those are important, but I think it can be overwhelming at first and makes people lose sight of what the algorithm is actually doing. All the array stuff and loops are just optimizations.

    • @3rikMad
      @3rikMad Před 2 měsíci +2

      For example, coin changer II can be solved like what's below in 14 lines and only 1 is doing heavy lifting. It's by no means the fastest way to solve it, but for understanding the essential parts of dynamic programming, I think it's more straightforward. All you have to for this problem is initialize your data structures, define your base cases, define what to do if you've seen the inputs before, then define what to do if you haven't seen the inputs before and store the result into the map of seen cases.
      class Solution(object):
      def change(self, amount, coins):
      return self.change_recursive(amount, sorted(coins), len(coins), {})
      def change_recursive(self, amount, coins, coins_considered, solved):
      inputs = (amount, coins_considered)
      if amount == 0:
      return 1
      if amount < coins[0]:
      return 0
      if inputs in solved:
      return solved[inputs]
      solved[inputs] = sum(self.change_recursive(amount - coins[c], coins, c + 1, solved) for c in range(coins_considered))
      return solved[inputs]

  • @dstick14
    @dstick14 Před 2 měsíci +14

    Prime keeps defending the status quo when asked about tech interviews when the status quo is infact in question! Yes you're going to pass an interview if you prepare for the bull shit they're going to throw at you but people are arguing that maybe there should be a better way than that.

  • @kirby145x
    @kirby145x Před 2 měsíci +12

    Bro was asked how to implement a CSS selector at google. 99% of google interviews now include leetcode hards. Not something so trivial/practical...

    • @BlueEyedSexyPants
      @BlueEyedSexyPants Před 2 měsíci

      I'm so used to those being hard questions that at first I thought he meant "how would you implement a parser for a CSS selector and the DOM traversal for updating it if you were building a browser?"

    • @brownie1035
      @brownie1035 Před 2 měsíci

      @@BlueEyedSexyPantsI don’t do front end, what does he mean? Like straight up the process of creating a css tag and implementing its behavior?

    • @BlueEyedSexyPants
      @BlueEyedSexyPants Před 2 měsíci

      @@brownie1035 No, I think it was literally just write it like you would in the browser, e.g. "div > *" Something so trivial that it's a joke that it was in an interview at all.

    • @ttheguyy
      @ttheguyy Před měsícem

      Exactly, the era now you have to be the best of the best to even get into an entry level position, its crazy

    • @SesterSinmon
      @SesterSinmon Před 3 dny

      @@ttheguyy Only in U.S. because in developing nations you'll have to be sufficient to do the job and that's it! Again Economics is KING it's a DEMAND and SUPPLY issue there are too many programmers and less jobs every year! Wait it's all about DEMAND and SUPPLY..........Always has been!

  • @hnielsen123
    @hnielsen123 Před 2 měsíci +11

    I feel like most people totally misunderstood neetcode's point. The original justification for it being used for interviews was that it showed a candidate's logical reasoning skills and understanding of core CS concepts. That's why it would hypothetically be a good way to evaluate someone. But then people just started memorizing everything, and so it became an arms race where everyone has to memorize everything to be competetive, and so now it doesn't serve as a measure of logical reasoning or high level CS fundamental, it's just a measure of who studied the hardest. Which, for better or for worse, is just a fundamentally different measurement. It'd kinda like if you could massively improve your score by studying for an IQ test. It wouldn't really be an IQ test anymore. It would still measure... something. But it wouldn't be measuring IQ.

    • @Vulture402
      @Vulture402 Před 2 měsíci +2

      It doesn't show a candidates logical reasoning or grasp of high level cs skills, though.

    • @johnblomberg389
      @johnblomberg389 Před 2 měsíci

      Spoiler alert: You can increase your score on an IQ test by studying for it.. it has been proven and that is why IQ tests (at least the standard Ravens Matrices and that shit) is largely useless unless it's the candidates first time doing them (and it won't be)

  • @Doomsdayparade
    @Doomsdayparade Před 2 měsíci +33

    I don't do leetcode for interview practice, I do it to challenge myself like I do with weight lifting. Reps to failure again and again.

  • @khalilnaji36
    @khalilnaji36 Před 2 měsíci +46

    Anyone else notice that in prime’s first rant kind of misunderstood his point? Pretty sure the guy in the video was trying to say that the general view around leetcode is that if you do it enough you’ll be able to solve any algorithm just like famous mathematicians.

    • @theropoy9371
      @theropoy9371 Před 2 měsíci

      Yeah

    • @kirby145x
      @kirby145x Před 2 měsíci +15

      Yea, and this opinion is somehow echoed on cscq. Some interviewers on reddit repeatedly say, "I fail candidates who memorized the algorithm, I want to see people come up with a thought process on their own." Even though the number of candidates who can do that are very slim. What they really mean, is "candidates who bullshit me into believing it."

  • @sergey1519
    @sergey1519 Před 2 měsíci +75

    Binary search is surprisingly difficult to implement. While the concept is really simple, there are 5 places where you can make off-by-one error, one place where you can get an overflow, one special case you might forget about, one check you might forget about. And there is also one way to implement it that works, but does an extra operation inside the loop that can be brought outside. Devil is in the details.

    • @KevinJDildonik
      @KevinJDildonik Před 2 měsíci +6

      So you just import a library or call a function. If all your programmers are reinventing the wheel every time, your code is a security nightmare and impossible to maintain.
      Asterisk, maybe you're a senior engineer at Intel designing a new CPU. You need your algorithms to be cycle perfect. Meanwhile, there are 100 marketing people working at all the vendors trying to sell your chips. They just need the website to display in a reasonable time. And getting it tighter relies more on things like caching than algorithm optimization. If a page takes 6 seconds to load the first time, but then gets cached for the next million views, who cares.

    • @justarandomguy6794
      @justarandomguy6794 Před 2 měsíci +8

      My dude, it's like two conditions

    • @programaths
      @programaths Před 2 měsíci +3

      @@KevinJDildonik In interviews, I asked to implement "overlap(a,b,c,d)" where a and b are respectively the lower and upper bound of the first range and c and d are respectively the lower and upper bound of the second range. So, they don't even need to validate that. Yet, most programmer fail to write good code.
      And there are plenty of libraries for hat, yet, if they can't write such a simple code (it's a one liner), they certainly can't think about more involved problems where you need to use two or three libraries the right way....
      And to top it, in my field (Tree to tree transformation driven by trees), custom made algorithms are a daily thing.
      And no, I won't be asking a dev to do something we do on the job, because I don't have 2 weeks of interview ^^

    • @Asto508
      @Asto508 Před 2 měsíci +6

      @@programaths I'm fairly sure you elaborate more in interviews about what overlap is actually supposed to do, but it's not immediately obvious here whether it's just supposed to be a range check if there is an overlap or whether it is supposed to produce an overlapping of both ranges.
      In first case, I would challenge you on the ambiguous name and in both cases, it would actually be better to reduce it from 4 parameters to 2.
      It's also important to note whether calls to that function can be assumed to be well-formed or not, otherwise it's definitely not a one-liner anymore and I would also tell you that if the solution is a one-liner, it's bad to have this function in the first place as it's just pointless indirection.
      All the reasons why I think such interview questions, if they actually aim to get "the correct solution", are just futile.

    • @thomassynths
      @thomassynths Před 2 měsíci +2

      Hard disagree that it is surprisingly difficult to implement. Off by one concerns don’t change this. In fact it’s so simple that 101 classes teach it.

  • @GameOn0827
    @GameOn0827 Před 2 měsíci +7

    I live in a barn, work on a farm, and program in my free time. Before covid, I worked with children for a living. This rant was made for me, haha. Can confirm it's all true.

  • @Night_Hawk_475
    @Night_Hawk_475 Před 2 měsíci +5

    I actually did derive Dijkstra's algorithm on my own (albeit: when applied to a tiled grid, at least, which is a more obvious/limited use case), I was just working on a maze-game for a final project in highschool and it seemed intuitive to me when I was checking that each maze had a valid solution that wasn't too short - I needed to measure the optimal solution's distance. Only realized it was some special algorithm that people are taught several years later when I was in Uni. Thankfully though that question is still a gimme for me in interviews, ahaha.
    I agree very much though with Prime's first counterpoint at the very beginning. And I generally agree that memorization of googleable issues is an awful way to measure a candidate's quality.

  • @bennygreatpeople
    @bennygreatpeople Před 2 měsíci +13

    5:30 No its so true - why would i want to work somewhere that gatekeeps on weird recall of esoteric knowledge instead of somewhere that just wants to see me work through a few more or less "normal" engineering problems

  • @nathanaelguirguis7886
    @nathanaelguirguis7886 Před 2 měsíci +7

    Farming was the worst example it requires constant problem solving. As a developer + farmer there are so many parallels between farm management and software development

  • @wizandoz
    @wizandoz Před 2 měsíci +14

    It is so funny for people to be super enthusiastic about algorithmic shit. Yet, in real life, most enterprise programming is writing code about talking to a database and saving events for marketing. Normal everyday tasks aren't about solving traveling salesman or making the most of sorting but "how to make this box highlight on hover".

    • @defeqel6537
      @defeqel6537 Před 2 měsíci +2

      This whole shit circles back to companies separating the actual programmers from hiring (edit: and instead delegating hiring to HR), so you get bullet point questions and answers

  • @AurikSarker
    @AurikSarker Před 2 měsíci +9

    bruh rural America looks down on the "coastal elite" all the time

  • @Reavenk
    @Reavenk Před 2 měsíci +8

    Modern farmers have an implicit (if not also a literal) mechanical engineering degree; of course they would be amazing problem solvers

    • @krisavi
      @krisavi Před měsícem

      and most could do geometry related (based on field size for example) and crop forecasting (weather, fertilizer, seeds) related math by heart. There goes a lot of math into farming that just will become natural over time. At least in past they had to solve most of problems on field with, but now it is minor problems because John Deere bricks the tractor or harvester and have to wait for their "mechanic" to come and reset error code.

  • @thomassynths
    @thomassynths Před 2 měsíci +30

    Quicksort without in place modifications is still quicksort. The glorious concept of orthogonality strikes

  • @Nellak2011
    @Nellak2011 Před 2 měsíci

    A* is the same as Dijstra's, but at each step instead of computing the raw distance you compute the raw distance and the heuristic and add them up. You explore the node with the minimum sum first and add it to the explored list.
    If you have 2 nodes exactly the same, you choose an arbitrary tie breaker like LIFO or FIFO and be consistent with it.
    There are 3 versions of A* and only 2 are relevant.
    Version 1 works with an admissible heuristic, but doesnt care if it is non-decreasing, but can lead to loops and other weird stuff.
    Version 3 works only if it is non-decreasing (and admissible. Non-decreasing or whatever it is called, implies admissibility). It involves a heap and visited list.
    I may be misrembering some details, but we just had an exam over this topic a month ago.

  • @dnullify100
    @dnullify100 Před 2 měsíci +4

    The game being played by many interviewrs: ask a hard question, watch the regurgitation, move on to the next.
    Especially for junior/entry level jobs.
    "Weird Twitter takes" are how very many interviewers think theyre supposed to conduct the interview these days.

  • @bkucenski
    @bkucenski Před 2 měsíci

    There's not just one answer to A*. You can speed it up significantly by side-caring the node lookup inside the main algo. I derived that solution when I was working with huge maps of geological data, but it turns out it was already published in a Graphics Gems book. You can also do post-processing to clean up the path by using line of sight for arial vehicles and traversal checks for land based vehicles that have a gradient limit. For every point, you see how far you can get down the line going straight to it and then chop out everything in between.

  • @RichardBuckerCodes
    @RichardBuckerCodes Před 2 měsíci +5

    2min and 3sec into this video and I'm yelling into the keyboard.... When I was 20 I interviewed at microsoft, did not get the got, but my answer to an interview question ended up in the code. When I was 24 I interview at Intel and was asked how much code I write in a year... at that time about 30-50K lines. The interviewer called BS and I never got the job. Years later I was converted over 2M lines of code from 18bit to 32bit for IBM in both c and assembler in less than a month. I interviewed at Amazon and asked to design a wordprocessor/texteditor at the time I was building high speed banking/payment systems.
    At the end of the day I get stupid questions from interviewers who do not understand that their job is to find highly qualified people not to act as gatekeepers. If Dikstra's algorithm is on an interview question then you should leave.

  • @slotos
    @slotos Před 2 měsíci +6

    My problem with interview coding questions is that I literally think in different languages when I solve abstract problems and when I apply those solutions towards a concrete goal. I forget how for loops and iterators work, as I go through the problems in a weird internalized version of a Cyrillic algorithmic language I learned when I was 12.
    I once spent 15 minutes bashing my head against an iterator method that was not returning what I wanted it to return, because it was “each”, not “reduce”. Call ends, I make the code work in 30 seconds…
    Also ADHD. Well, probably all of that is ADHD…

    • @oncedidactic
      @oncedidactic Před 2 měsíci +1

      Yeah this, interviewing =/= problem solving, and the distributions will never overlap exactly unfortunately

  • @remrevo3944
    @remrevo3944 Před 2 měsíci +7

    9:20 That's definitely not how I would calculate 55*32!
    Here is how I calculate it: (In my head! No paper required.)
    55*2 = 110
    3 * 55 = (2 + 1) * 55 = 110 + 55 = 165
    1650
    +110
    =
    1750

    • @jamesst8503
      @jamesst8503 Před měsícem

      You mean 1760. "We regret to inform you that you didn't pass our first round of interviews" lol

    • @remrevo3944
      @remrevo3944 Před měsícem

      @@jamesst8503 That's called a typo.
      I just should never written it down lol

  • @guywithknife
    @guywithknife Před 2 měsíci +46

    A* is very simple. It’s just dijkstra’s but when you get a node’s weights, you add a heuristic to it (often simply the straight line distance to the target). It’s literally a one line change to dijkstra’s

    • @briankarcher8338
      @briankarcher8338 Před 2 měsíci +2

      Yeah, A* just guides you towards the target in a scenario where you can do the distance formula - grids, usually. It's extremely efficient. Very common in video games.

    • @TAP7a
      @TAP7a Před 2 měsíci +6

      @@briankarcher8338not just a grid, especially in video games, it works on any mesh in any space with a well-defined metric

    • @moonasha
      @moonasha Před 2 měsíci

      A* is actually the first 'real' algorithm I ever programmed, I read an article about how it works, and made it myself without using anyone else's code, for a little top down real time strategy type game. Was honestly a load of fun, everyone should try it, a basic A* algorithm is super easy to implement. These days I just use unity's built in navmesh for everything, but I kind of want to go back and see if I can do A* better again

  • @TurtleKwitty
    @TurtleKwitty Před 2 měsíci +7

    Just starting getting to your rebuttal of his first point; I think he's meaning you have to already know the answer going in, it's not really something a usual person could derive without just knowing the answer. Say the cycle detection trick, the normal first thought is to keep a list of pointers and check against that, not the turtle and rabbit race -- unless you've studied the question and knowthe answer upfront now, so equivalent to peeking to someone elses solution on an exam. Although wouldnt count that as actual cheating cause knowledge sharing is aprt of programmer culture and algos are a thing that circulate but I get what he means

  • @hershjoshi3549
    @hershjoshi3549 Před 2 měsíci +1

    I got a question that took a 2 hour long graduate cryptography lecture to explain and is a backgracking hard that is leetcode #2000-something. Some interviews really are stupidly difficult. I got another really tricky priority queue question recently that was a medium to a hard 2 weeks back.

  • @frozenlettuce653
    @frozenlettuce653 Před 2 měsíci +1

    I also freaked out when Neetcode didn't write the 1 on top when carrying it out to the neighbor lol

  • @philipphanslovsky5101
    @philipphanslovsky5101 Před 2 měsíci

    Damn the hand motion reminded me of Schitt's creek before you even said it. What a great show

  • @jeffrey5602
    @jeffrey5602 Před 2 měsíci +1

    We interviewed a physics phd with two years of data science experience for a position a few weeks back and he made two mistakes in a single line trying to read in a csv file in pandas. Not kidding. He didn’t assign it a variable and he also forgot string quotes around the file name. He went on to do mistake after mistake. Couldn’t parse date column to date time, couldn’t make a simple group by. We had to eventually stop the interview.
    This is always the first thing we test people on if we are unsure about their coding experience and it’s surprising how many people struggle with real world stuff. But we test for it because this really is the minimum you need to be able to do. Literally doesn’t care if he/she can explain gradient descent in math terms. Have to add that we let the interviewee use pandas / numpy / matplotlib docs as well

  • @Aberusugi
    @Aberusugi Před měsícem +1

    The most senior dev I've ever known has never done a coding quiz when interviewing prospective employees and thinks they are stupid.

  • @attilazimler1614
    @attilazimler1614 Před 2 měsíci +3

    lol, we literally asked at a few companies the fizz-buzz and most people have no idea how to even start, you are supposed to figure it out :D

  • @vedantranade1815
    @vedantranade1815 Před 2 měsíci +5

    how does prime create a 29 minute video yapping about a 6 minute video man, how does he do it!

  • @cassandrasinclair8722
    @cassandrasinclair8722 Před 2 měsíci

    All search algorithms like Uniform (aka dijkstra), A*, DFS, and BFS are actually the same algorithm, except for the container that you are using to keep track of open/not explored nodes.
    Uniform search has a priority queue, and the priority is given by cost to current node + cost to the adjacent ones.
    BFS just throws all nodes in a fifo queue.
    DFS just throws all nodes to a stack.
    A* modifies uniform search with a heuristic to change the priority in the queue.

  • @a_macaulay
    @a_macaulay Před měsícem

    Always bet on the farmers! I was teaching a few courses at a local university for the Agricultural Mechanization program and their learning speed for PLC programming and electrical circuits was impressive. We were able to go into much more advanced topics over the required core.

  • @joesilvareality
    @joesilvareality Před 2 měsíci +1

    I think farmers who have gone to college in the past have made some of the best engineers and likely also programmers. Not one myself, but have known some farmer and farmer-adjacent folks who can build a car from scrap materials as a side project, definitely think it's a good idea to get your kids into hands on tooling if you can.

  • @playea123
    @playea123 Před 2 měsíci +9

    Prime doesn’t like it when people preface too much or give a hot take expecting people to understand the nuance 😂

  • @radovanobal3842
    @radovanobal3842 Před 2 měsíci

    yeah I'm from such a location. When I went to uni they classified me and my friends as "can't possibly finish uni" and we were second hand students in any lab or class room from day 1.

  • @kampanartsaardarewut422
    @kampanartsaardarewut422 Před 2 měsíci +1

    want to test the coding interview?
    - implement the BigDecimal
    - create datepicker with only pure html javascript css + copy paste text
    - create a decimal textbox that user type only number but show delimiter as preferences + copy pasted value

  • @darkdudironaji
    @darkdudironaji Před 2 měsíci +3

    17:15 "I got like 2 inches here people! It is unfair!"
    Nice to know Prime.

  • @BenMorse0
    @BenMorse0 Před 2 měsíci

    13:43 you can’t separate confounding factors like how to use a keyboard a computer concepts like copy paste web browsing opening files etc

  • @ERICLAU0304
    @ERICLAU0304 Před 2 měsíci +1

    anyone has the link to the "city escape" array problem mentioned at 23:25?

  • @isocuda
    @isocuda Před 2 měsíci

    I WAS a math superstar in grade school, I fixed cars and worked in motorsport. Which IS a lot of numbers, but I still forgot almost everything long before I decided to study CS. It's always hilarious to me when math shortcuts is strongly associated with problem solving (it is obviously), but a LOT of math gooners don't have other critical thinking skills.
    Like you can measure one of those block puzzle tests and figure out your inverses, but flipping them around and eyeballing the boundary will get you to the solution faster if you systematically flip things that look like they'll fit. Which is technically ratios like poker, but you're not actually doing math.
    The way I was raised is that being a "master of none" is generally better. Same thing with memorization, just be able to GET the information you need without having to research.

  • @rexigon1757
    @rexigon1757 Před měsícem

    I constantly feel insecure about my programming abilities but having prime say dynamic programming is hard made me feel a little better cause I actually feel confident with that and coin change

  • @NotNotAsian
    @NotNotAsian Před 2 měsíci

    Why on earth would you ever be re-implementing QSort? I personally use the nice fast qsort provided by standard library that will be updated if there is ever a faster version of it.
    If I got that question I would assume it was a trick question.

  • @C4CH3S
    @C4CH3S Před 2 měsíci +7

    Math vs farmer point is absolutely true. I told a friend about TOP (He left his math degree at Oxford due to finances) and after only 4 months he was working and already extremely proficient with coding. Vs my other friends who got into coding but had unrelated experiences to problem solving, which took them years to get into it.

    • @anon-fz2bo
      @anon-fz2bo Před 2 měsíci +3

      while im far from the worst at math & that ive come to realize that math is basically the oldest programming language (it has operators, including logical operators, sequence types, constants, algorithms & functions too)
      it doesn't mean that being good at it automatically makes you a better programmer, in my experience, the illusion of "extreme proficiency" in programming is largely dictated by the tools/environment & language used, with exception to some programmers.
      while they share some stuff in common, they are entirely different skill sets at the end of the day.

    • @C4CH3S
      @C4CH3S Před 2 měsíci +2

      @@anon-fz2bo you can't deny that it helps a lot if you are good at advanced maths, though I must say being "skill hungry" is probably a much stronger indicator if you are going to be good or bad at programming

    • @anon-fz2bo
      @anon-fz2bo Před 2 měsíci

      ​@@C4CH3Sim not sure i agree entirely with your first statement, imo its not as simple as a binary answer, its deeper than a yes or no as it depends on a multitude of factors.
      but i do agree with your second statement. in any case im just glad i find math interesting & easy for the most part, same thing with programming although i love the latter much, much more 😂

    • @asdfqwerty14587
      @asdfqwerty14587 Před 2 měsíci +1

      Eh.. I think that's a pretty classic case of correlation not causation. I don't think anyone would argue that people who are good at math also happen to be good at coding - there's a lot of overlap in the thought processes required for those things.. but that doesn't mean the things that they learned are necessarily that meaningful - they probably would've found it rather easy to learn coding even if they didn't have a higher education in math just based on their innate talents.

    • @user-os4lj3pi4q
      @user-os4lj3pi4q Před 2 měsíci +1

      @@anon-fz2bo math is the base of EVERYTHING. If you know real math (how to proof stuff, how to understand your problem and so on), you can go anywhere you want. But in engineering they only learn how to use stuff, not how to create math. That's a big common intersection between CS (with a strong basis in math btw) and math (the real one, not the one in engineering. That is practical, but not the whole thing. Engineering is like the bootcamp of math).

  • @Julzaa
    @Julzaa Před 2 měsíci

    You were particularly unhinged on that stream 😂😂

  • @winterfriday
    @winterfriday Před měsícem

    I've never been asked a CSS problem. IBM pre-interview I had was:
    If a professor goes through w chapters and repeats w chapters for the entire x days their course runs, how many chapters does a student miss if they're abscent from y-z days.
    A grading problem that more or less boiled down to knowning how to use BTreeMaps.

  • @SteveBarnes0
    @SteveBarnes0 Před 2 měsíci

    My first interview question for the second company I worked for was "How would you write malloc?" 😅

  • @thekwoka4707
    @thekwoka4707 Před 2 měsíci

    Djikstra and A* are both very similar and just use priority queues based on different things.

  • @moneymaker7307
    @moneymaker7307 Před 2 měsíci

    I have interviewed three time at google.
    The first time I failed bcos the question requires deep understanding of quad tree.
    The second time I failed bcos of some crazy union find questions.
    The third time I failed bcos of a segment tree question.
    I am yet to get a realistic google question

  • @tutacat
    @tutacat Před 2 měsíci +1

    Memory works best in a linear fashion. Each thing can lead to another. We dpn't know how the neurons work on a fundamental level, but it probably has more to do with order. We literally have spatial memory. It's 3D.

  • @jatinchhabra1069
    @jatinchhabra1069 Před 2 měsíci +1

    I crammed this multiplication algorithm from childhood up until late middle school, after learning about factorisation I did something similar and understood why this worked, that day I understood schools are not teaching things that they should be teaching.

    • @briankarcher8338
      @briankarcher8338 Před 2 měsíci

      That they should teach algebra concepts to 3rd graders? I'm not sure how you get past just memorizing the process for them.

    • @jatinchhabra1069
      @jatinchhabra1069 Před 2 měsíci

      @@briankarcher8338 I don't get how you concluded "teach algebra to 3rd graders". I don't know about other countries' education systems but in India it's pretty bad, most of the schools/teachers just teach you to cram formulas. I had had great teachers, one of my teachers taught high school mathematics (calculus) like it was literature, they created a story around it, how it was developed, why we use it, where to use it, he even derived certain formulas, I really liked this type of teaching.

  • @blackt0wer
    @blackt0wer Před 2 měsíci +6

    DFS > BFS, I'm ready for my new career.

  • @nevokrien95
    @nevokrien95 Před 2 měsíci +1

    Inverse trig substitution is mostly a contrived thing. Its only really for nice polynomials.
    And by nice I mean second order... like you can't solve a 3rd let alone 5th order polynomials with it

  • @CocoaPimper
    @CocoaPimper Před 2 měsíci

    There are many different variants of binary search though… mainly it boils down to how to pick the “middle”.

  • @SandraWantsCoke
    @SandraWantsCoke Před 2 měsíci +1

    I wish they asked these kind of questions: Can you build us a scalable, bug free, good looking, performant frontend with React? To which I would say yes and that it would take me about a month to have a working prototype, then I would deliver, because that's where my skill lies and then I would be hired. But it does not work this way for some reason.

  • @LuisM_Santana
    @LuisM_Santana Před 2 měsíci

    Came for programming advice, stayed for the parenting advice. Good stuff. Great video

  • @byron2099
    @byron2099 Před měsícem

    New to the channel this dude hilarious 😂

  • @noomade
    @noomade Před 2 měsíci

    "The man is double foiling"... ah hahahahaah... don't know why but I laughed for a minute after that .. LOLOL!

  • @petercfraedrich
    @petercfraedrich Před 2 měsíci +2

    some of us had shit math teachers who didn't even think to explain why things worked

  • @RetroGenetic
    @RetroGenetic Před 2 měsíci

    Only reason I am a bit worried about AI and "expecting it to be far in the future", reminds me of the AlphaGo vs Lee Sedol as that moment was supposed to be at least 10years in the future, but I don't think the GenAI is really going to take any jobs, but will become a decent tool, and when it comes to general AI, we are quite a long ways from the required processing power :D

  • @justarandomguy6794
    @justarandomguy6794 Před 2 měsíci +2

    I've been wondering about this.
    Is it better to solve the problem yourself or is it better to learn the way it is solved

  • @NaourassDerouichi
    @NaourassDerouichi Před 2 měsíci

    The starting point, lmao :)

  • @Tech-sf5wo
    @Tech-sf5wo Před měsícem

    Dude is priceless: “small hands and short neck but at least I’m good at math” 🤣🤣🤣

  • @ben_clifford
    @ben_clifford Před měsícem

    0:39 I interviewed with Amazon (back when they flew you out to WA for it), and the dude wanted me to implement an LRU cache from scratch. He made sure I didn't know what it was beforehand. When I got home, I looked it up and discovered that it was indeed one of those algorithms written as a thesis by a genius.
    Gimme a break. Even the genius who wrote the algorithm couldn't come up with that in a 50 min interview.

  • @kierandansey7293
    @kierandansey7293 Před 2 měsíci

    It wasn't a starting point, it was an ending point. The ending point of your participation in the Google recruitment process!

  • @GoWithAndy-cp8tz
    @GoWithAndy-cp8tz Před měsícem

    btw The fastes way to multiply 55*32 is to shift it left by 5 times because 32 is binary value 100000 which is 1 (0b1) shifted 5 time to be 32 =0b100000;
    Same way like multiplying by 10 in decimal system means sign zero to the value so in binary world, multiplying by 2 means to sign 0 at the end to the value;
    mov eax,55
    shl eax,5
    now eax holds result: 0b11011100000 or 0x6e0 or as you wish decimal 1760
    shl eax,5
    0b110111

  • @johnodonnell5342
    @johnodonnell5342 Před 2 měsíci

    I’m a programmer from Ohio. I’ve worked with programmers who also farm, and farmers who work tech jobs to make ends meet. They’ll work a 9 to 5 in tech while running a small farm, or helping out on the family farm.

  • @thedudegotfourviews
    @thedudegotfourviews Před 2 měsíci

    When you said "number one" it reminded me of Borat for some reason 😂

  • @TonyKingOfTheOzone
    @TonyKingOfTheOzone Před 2 měsíci

    Just got done with data structures class, and while completely eye opening, and using leet code to see how things work, or dutch national flag problem. Find interesting ones, break em down, add to the original leet code problem, and move on. Theres so much to learn, and you should have a solid foundation in algorithms, dont think interviews are just algos. Its a part of it, but not more of a check system rather than the mega defining factor.

  • @Esgarpen
    @Esgarpen Před 2 měsíci

    I had an interview question at my current work where I had to drag up some old graph-theory book from school to solve... needless to say I pretty much botched the interview in every way humanly possible and still managed to get the job.. maybe you don't have to be 100% correct in your answer to get the job. In my experience, it is how you talk about your code and how you are presenting your solution that is evaluated, being correct is just a +
    But I guess that's my hottake

    • @allenmoody7527
      @allenmoody7527 Před 2 měsíci

      Simplest explanation is that the other candidates just botched it even more. I botched a graph theory question during a coding test a couple days ago, but using outside resources is considered cheating, ah well.

  • @arturfil
    @arturfil Před 2 měsíci +1

    I think Neetcode refers to leetcode questions where the bar has been raised so high that interviewers start seeing the more complex solution like in "Top K Frequent Elements" where the logical answer is you use a heap and return k elements, or use bucket sort but then there's people that know the Hoare's sort and I'm not learning that by memory (now). When I have to remember so many other important patterns first.
    Also, I believe people cheat mostly in OA's I believe that's where Neetcode refers to cheating. In an in-person interview you can't cheat. You memorized? Sweet, that's advantage to you and good for you. But I can see what Neetcode says where the initial screening interview I had to solve some medium to hard leetcode questions. I won't complain, it is what it is, I'll just practice more, but it is definitely getting harder.

  • @ezequielghienaramos4777
    @ezequielghienaramos4777 Před 2 měsíci +1

    The math (pure maths) background it's really useful because you have to memorize and practice a lot buuut at the same time learning how to do proofs, and how proofs works. I remember trying to memorize proofs on my first year and on my second year I was already reverse engineering proof results to arrange the proofs. Why do the author of the book chose epsilon to be less than (b-a)/2*arctan(mass of the sun)? It's not magic it's a process that you have to do aswell to understand how everything works, and that's learning at its peak

  • @ReedoTV
    @ReedoTV Před 2 měsíci

    replacing multiplication with a quadratic expansion to make it easier is a bold move

  • @brownie1035
    @brownie1035 Před 2 měsíci +1

    Wish I got these la la land interviews. I’m spending more time outside of work doing leetcode rather than learning real skills

  • @TangoFoxtrotWhiskey
    @TangoFoxtrotWhiskey Před 2 měsíci +2

    Everyone just learned basic Algebra.

  • @airkami
    @airkami Před měsícem +1

    No one taught me data structures and algorithms in school or work. That’s why I ask people where do I learn how to learn things the way leetcode and advent expect people to have learned how to learn?

  • @bobmcboberton8847
    @bobmcboberton8847 Před měsícem

    As a farmer/programmer I can agree that mathematicians would have an advantage in learning programming but after I understood problem solving it was like opening the floodgates. Very rewarding to learn.

  • @NyanCoder
    @NyanCoder Před 2 měsíci

    9:15 you in 'merica really write trailing zeroes before answer?

  • @konstantin2296
    @konstantin2296 Před měsícem +1

    - Pass an interview with complex algorithms
    - Start working
    - Use complex algorithms to improve performance
    - Get comments on code review "too complex, people will not understand how that works"

  • @Forbizz
    @Forbizz Před 2 měsíci

    What was this whole farmer tangent? He just did some long form multiplication.

  • @S-we2gp
    @S-we2gp Před 2 měsíci +2

    The issue with leetcode problems is there are so many that are total bs that it’s hard to filter out which problems are reasonable and which are some stupid ass bit manipulation or dynamic programming trick. I work on a problem only to find out the solution was some gimmick crap thing

    • @DaVinc-hi7hd
      @DaVinc-hi7hd Před 2 měsíci

      yeah, this happened with me, took me a whole day to realize I was not gonna solve the convex hull problem, did lots of brainstorming, still didn't get anywhere, at last I just had to look at the solution and it was like the gimmick crap thing that you just mentioned.

  • @brandonwlee2013
    @brandonwlee2013 Před 2 měsíci

    Missed opportunity to say “the name… is the NeetCode-agen”

  • @Stefan-xm9qb
    @Stefan-xm9qb Před 28 dny

    I used to memorize nothing in math and derive everything while doing the exam but at some point in the 11th grade the formulas became too complex to derive so it took too long and I discovered have enough time during exam. So I failed miserably. Then I quit school and became a programmer.

  • @zac9933
    @zac9933 Před měsícem

    One time I had a group interview and the interviewer literally pulled out a bunch of play-doh, handed everyone a container, and said "okay you got 5 minutes to make whatever you feel like making then explain why you made it." It was a valet job parking cars at a hotel.... stupidest interview I've ever attended.

  • @andrey6104
    @andrey6104 Před 2 měsíci

    Holy shit the middle part of the video about difference in talent is based af

  • @thekwoka4707
    @thekwoka4707 Před 2 měsíci

    I very much agree on the point that interviews are rarely that tough.
    Also, Djikstra's algorithm isn't THAT hard. Probably wouldn't have time to pull it out in a coding interview, but I "reinvented" it during Advent of Code trying to solve a problem because I ha ever heard of Djikstra.