Coding Interviews Be Like

Sdílet
Vložit
  • čas přidán 15. 02. 2021
  • Coding interviews are hard. But why grind LeetCode, study data structures and algorithms, and read Cracking the Coding Interview when you can simply "throw a hashmap at the problem"?
    This video may or may not be based on a personal experience...
    This is a different type of video from my usual content, let me know what you think about it!
    If you're reading this, comment "Facezongoogappflix"
    #codinginterview #softwareengineering
    Sub Count: 424
    Check out these videos:
    Computer Science Majors Be Like- • Computer Science Major...
    First Semester of Waterloo Computer Science- • First Semester of Wate...
    It's Finals Season- • It's Finals Season | U...
  • Komedie

Komentáře • 5K

  • @nicholast
    @nicholast  Před 3 lety +25591

    this was actually based on a personal experience

    • @nicholast
      @nicholast  Před 2 lety +769

      @@AndrewCheetah no way!

    • @firestarter000001
      @firestarter000001 Před 2 lety +318

      The code looks like Java, do the questions in your area for Java Developers really look like this? Im from Poland, but I often aslo apply to international companies, and those mathematical problem solving seems a thing of the past here , assuming we are talkign about bussiness software. 10 years ago it could happen (i remember when Codility was very popular here, many problems were a variation on quicksort...) , but nowadays its usually just a lot of knowledge checking : some basic Java questions,.Java 8 constructs alwys, design patters, frameworks (Spring , hibernate etc.), webservices,SQL and no SQLdb , javascript, coding theory SOLID etc. , maybe they give you some code to review. I actually think its a better approach because that relates much more to what you will do at work with bussiness software. Unless you apply for games software or some niche science projects, I guess, but its rare with Java.

    • @firestarter000001
      @firestarter000001 Před 2 lety +297

      But as to the point, yeah, the mutistage interviews are really frustrating:). You tought you made it , but it turns out it was just the mid level boss:)

    • @MillandeepSingh
      @MillandeepSingh Před 2 lety +56

      Did you pass the other interview 🙄

    • @nicholast
      @nicholast  Před 2 lety +355

      @@MillandeepSingh im pretty sure i passed because i got the optimal solution, but didn't get the offer 😥

  • @bluegizmo1983
    @bluegizmo1983 Před 2 lety +54755

    Bombshell: they're not actually interviewing you, they're just stuck on a code problem and want a free solution! 🤣

    • @nicholast
      @nicholast  Před 2 lety +6670

      haha i've seen startups give take-home projects that just look like work they need someone to do for free😂

    • @BeanyB0b
      @BeanyB0b Před 2 lety +952

      lol, they need help solving two sum for important business reasons. nobody else has been able to solve it to date

    • @ezraodole933
      @ezraodole933 Před 2 lety +35

      XD

    • @alan99yu
      @alan99yu Před 2 lety +17

      LOL

    • @pokedart9001
      @pokedart9001 Před 2 lety +660

      No shit this is actually kinda what one of the questions I was asked for my current position was - he basically just wanted my input on how I might go about solving a real problem he was working on, it was actually pretty neat

  • @haseebazam7164
    @haseebazam7164 Před 2 lety +11731

    Don't forget the part where they say "Good, now we'll move on to a hard problem"

    • @nicholast
      @nicholast  Před 2 lety +1005

      that would've been good

    • @creeks123
      @creeks123 Před 2 lety +34

      @@nicholast Teach me the ways.

    • @praharshsingh2095
      @praharshsingh2095 Před 2 lety +19

      :This is Fine meme

    • @metehanfirat3446
      @metehanfirat3446 Před 2 lety +6

      We made a pong game in Python using the Turtle and Freegames libraries. czcams.com/video/QPKOBeNwRbk/video.html

    • @coolgeYuhang
      @coolgeYuhang Před 2 lety +7

      be like , let me find HARD one in the leetcode and this will be a problem for next interview

  • @simonanikolova1719
    @simonanikolova1719 Před 2 lety +4923

    In my coding interview, I realized I could use a hashmap to solve one of the tasks. Then I remembered this video. I smiled and became less nervous. I passed the interview. Next week is my second interview. It is for my dream intern position. Wish me luck, guys

    • @JohnDoe-yq9rt
      @JohnDoe-yq9rt Před 2 lety +169

      great, have fun making apps to make some jewish guy rich :-)

    • @joonorganic
      @joonorganic Před 2 lety +48

      HOW DID IT GO

    • @simonanikolova1719
      @simonanikolova1719 Před 2 lety +389

      @@joonorganic Thank you, It went perfectly. Also, I had one more interview with another company and a hashmap saved me again :D

    • @simonanikolova1719
      @simonanikolova1719 Před 2 lety +632

      Update : I got an offer from both companies. Learn your hashmaps and good luck to everyone!

    • @joonorganic
      @joonorganic Před 2 lety +101

      @@simonanikolova1719 AYY WE SO PROUD OF U

  • @brunomillalaf8553
    @brunomillalaf8553 Před 2 lety +2090

    I studied coding and struggled during the interviews. Now I’m a full time burger developer at McDonalds.

  • @Sky4Jus
    @Sky4Jus Před 2 lety +21215

    "Do you think you could make it faster?"
    "Nah, I'm good"

    • @nicholast
      @nicholast  Před 2 lety +3375

      “You’re hired!”

    • @ThiagoRibeiroo
      @ThiagoRibeiroo Před 2 lety +257

      underrated comment lmaoo 🤣🤣

    • @nateF888
      @nateF888 Před 2 lety +174

      Your pfp fits ur comment perfectly 😂

    • @domr4879
      @domr4879 Před 2 lety +29

      Lmao

    • @errhka
      @errhka Před 2 lety +435

      Me, a pragmatist: "get better hardware"

  • @peacelove6455
    @peacelove6455 Před 2 lety +17706

    "That....should work?"- Every Programmer

    • @maxhughesgray2591
      @maxhughesgray2591 Před 2 lety +381

      Yeah, you go through every situation in your head and something still goes wrong.

    • @jeremysutherlin7565
      @jeremysutherlin7565 Před 2 lety +630

      99 little bugs in the code, 99 little bugs. Take one down patch it around, 437 little bugs in the code!

    • @maxhughesgray2591
      @maxhughesgray2591 Před 2 lety +98

      @@jeremysutherlin7565 99 bugs and a segmentation fault ain't one.

    • @10thing7
      @10thing7 Před 2 lety +5

      😂😂😂😂😂😂

    • @metehanfirat3446
      @metehanfirat3446 Před 2 lety +3

      We made a pong game in Python using the Turtle and Freegames libraries. czcams.com/video/QPKOBeNwRbk/video.html

  • @ameyb9241
    @ameyb9241 Před rokem +370

    I got hired for my first job in an IT company on my first try a few months ago. The interview guys were very chill. The HR asked about my life experience s and my side hustles along with studies. The technical guy asked questions about Java, Android development stages and later on, Angular (which I didn't know much about). Moved to a new city now and the working environment is great. Such interviewers are awesome.

  • @amyb2589
    @amyb2589 Před 2 lety +25

    This was actually just helpful for me to have some different ways to look at this problem! Thank you!

  • @needmusicnow7
    @needmusicnow7 Před 2 lety +10912

    Do I know programming? No.
    Do I understand the jokes? No
    Have I been marathoning all these videos and somehow loving them? Absolutely

    • @nicholast
      @nicholast  Před 2 lety +452

      glad you like them and hope you learned something from them haha :)

    • @alfonsopinto1859
      @alfonsopinto1859 Před 2 lety +28

      sneaker heads be like

    • @opatechnus
      @opatechnus Před 2 lety +19

      i think interviewing candidate just based on algorithm solving is just stupid. In work 90% of employees will never encounter this. And things you want to test are untouched.

    • @Mothuzad
      @Mothuzad Před 2 lety +23

      @@opatechnus That's a strange reply to the root comment.
      Anyway, if it's a good interview, the algorithm skills aren't meant to be a reflection of practical work, but rather, it demonstrates fundamental skills that are required to do good programming in general. A typical coder shouldn't spend much time optimizing, but they should at least not write code that's absurdly inefficient, and avoiding those pitfalls should be so natural that there's never even a conversation about it. That's why these kinds of technical questions are seen as a bare minimum for hiring.

    • @loganhh1043
      @loganhh1043 Před 2 lety +6

      Sad thing is I understand a bit like I can read the code and know what it’s doing but I didn’t do hash map or at least do it enough to remember a damn thing on it

  • @sb-jo2ch
    @sb-jo2ch Před 2 lety +16275

    I was literally asked the same question that I had solved the previous night, word for word. I deliberately started writing a naive approach, then halfway through that, pretended like I had just got a revelation, commented out the naive code and barfed up the O(n) solution like a freaking genius. Code worked.
    Didn't get the job.

    • @nicholast
      @nicholast  Před 2 lety +2690

      LOL good try tho

    • @waltwhitman7545
      @waltwhitman7545 Před 2 lety +371

      damn you should have

    • @kekag
      @kekag Před 2 lety +1541

      @@hebariaz6134 It's not very difficult to tell when people act like they don't know something. The interviewer is generally more concerned about the thought process and ability to solve a problem they don't already know the answer to.

    • @mxd1232
      @mxd1232 Před 2 lety +94

      Why would You do that though?

    • @Pharoah2
      @Pharoah2 Před 2 lety +1992

      @@kekag yep. Theyre not testing memory. If you’re going to pretend you havent seen the problem (which is a good strategy) you cant just “have a revelation”. Sell the thought process. Write up the pseudocode for the naive approach and then say there’s definitely optimizations that can be made. Sit and think. Think aloud. Walk through logic that would lead to those “revelations”

  • @personxyz1840
    @personxyz1840 Před 2 lety +405

    This was my real experience, started interviews past 2 weeks rejected by 3 and counting. Each rejection is an experience and become better I am sure I will get through this phase.

    • @personxyz1840
      @personxyz1840 Před 2 lety +73

      Glad to inform got 3 offers and played salary matching game. I got my expected salary but not landed in tier 1 companies. I will continue preparing leetcode and land in tier 1 company. My salary increased more than 30%(TC - 210K).

    • @Ryan-ul7dy
      @Ryan-ul7dy Před 2 lety +6

      @@personxyz1840 Congrats! So you already had some experience as a developer and was just switching companies?

    • @personxyz1840
      @personxyz1840 Před 2 lety +17

      @@Ryan-ul7dy Yes!! Lots of Experience I was out of job search market for long time.

    • @sree00
      @sree00 Před rokem

      ​@@personxyz1840 Hey could you please tell a little bit about what you said for the salary matching part

  • @thereasonableprogrammer4921
    @thereasonableprogrammer4921 Před 3 měsíci +72

    I first saw this video a couple of years ago. I had never solved a leetcode problem and it was all gibberish to me.
    Now, every single thing makes sense and are intuitive solutions. Never give up, keep up learning and trying with your Leetcode!

    • @prakriti7571
      @prakriti7571 Před 16 dny

      can you tell me how you started leetcoding... it actually makes no sense to me and I am always afraid to start

  • @mirelvtl8830
    @mirelvtl8830 Před 2 lety +3461

    Dude when the interview started I felt like I was the one being interviewed. I felt that fear in me

    • @nicholast
      @nicholast  Před 2 lety +346

      😳😳 coding interviews are so nerve wracking that they can be felt through a screen 😂

    • @mryzarc8
      @mryzarc8 Před 2 lety +7

      I share that feeling

    • @AmanDeep-rk6je
      @AmanDeep-rk6je Před 2 lety +28

      @@nicholast your video just scared me for my future , I m gonna start my term in fall this year in computer science major

    • @sonicbroom8522
      @sonicbroom8522 Před 2 lety +5

      @@AmanDeep-rk6je Don't be scared. There are other companies besides Google etc.

    • @blitzedoblivion4280
      @blitzedoblivion4280 Před 2 lety +5

      Cam??

  • @RealitaetsverweigererDerAmpel

    I'm a german software engineer working at a big company developing MASSIVE software (over 80 million lines of code) and i've never had a "coding interview" lol. Also i think that understanding problems quickly and knowing where to find the information you need is a far more important skill than explaining a sorting algorithm when you've done nothing else but learning them for the last couple of days. When you work and don't refesh your sorting algorithm knowledge you forget 95% of it after a few weeks anyways and even then you can just google it. Not something to differentiate good coders from bad coders imo. Using the best optimal runtime algorithms possible is pretty important but as i said.. you can just google it, it's just important to have heard it once and to know that it is a thing.

    • @shaunreich
      @shaunreich Před rokem +38

      The funny part is, for 90% of the use cases, you're doing it wrong. It's the same thing with security, don't reinvent the wheel, your wheel won't be as round, the stdlib of any language you're using has a much better sorting algorithm than you will be able to make (they actually use a combination and heuristics and can even run in parallel)

    • @unutilisateurdeyoutube1256
      @unutilisateurdeyoutube1256 Před rokem +3

      Yes sir, I think you're right.

    • @armin3057
      @armin3057 Před rokem +11

      yeah but in germany its hard to get a job without a degree, in the US you can at least do that with one bootcamp

    • @shabsukkar
      @shabsukkar Před rokem +1

      hello sir can i talk with you

    • @marinero.bengali2
      @marinero.bengali2 Před rokem +5

      100%, if you are on your third or second year of your degree you probably are going to remember this better than somebody that got the degree 7 years ago and has 10 years of experience xD

  • @jeromesimms
    @jeromesimms Před rokem +59

    I remember the first time I watched this video over 6 months a go as a CS freshman I didn't even know what a HashMap was much less anything regarding time or space complexity but now I have been pleasantly surprised that I understand everything in this video now

    • @andrewhinson4323
      @andrewhinson4323 Před rokem +4

      me too, but I sure as heck cant converse comfortably like that XD

    • @CallMeDeeWee
      @CallMeDeeWee Před rokem +2

      This is me now, I hope to be back in 6-9 months to see the progress that I will have

    • @natasdabsi1138
      @natasdabsi1138 Před rokem

      Give me 6months

    • @josephubi9096
      @josephubi9096 Před rokem +1

      Could you please help with materials or a guide on how to learn these things in their order of
      importance and according how I will need them to advance my learning.
      I just started out and have not being making enough progress because I don't have a streamlined
      learning pathway to teach myself all the necessary things I need to become a software engineer.
      Please kindly help with resources if you can, I can't afford college.

    • @jeromesimms
      @jeromesimms Před rokem +2

      @@josephubi9096 Hey, sure. It really depends on where you're at currently and what you are trying to do within the field of computer science; whether it is web development, game development, data science And AI, or becoming a back end web developer.
      However regardless of what you want to do, having a good foundation is very important. So I'm order to learn the basics of how to program I would recommend learning python as it's quite beginner friendly, although personally my first programming language was C and looking back it was definitely a great foundation but extremely hard to pick up at first. So in order to learn the basics of programming with python I would recommend the course Python for Everybody (you can find it on Coursera, edX and even CZcams) because it will start off slowly introducing you to simple topics but by the end of it you will know how to use python to parse a web page and make requests to an external API.
      After you learn the basics of programming with python, I think you should switch gears and learn a bit of web development by learning html, css, and JavaScript. A good resource for that is freecodecamp.org or even the Odin project which you can find online. Once you do that you should have a good feel for the basics of programming. Reading computer science textbooks can also help too and then you can decide what you would like to build next. I hope this helps you.
      In fact, here is a link to a GitHub repository that gives an alternative line of courses for you to take: github.com/ossu/computer-science

  • @milos5247
    @milos5247 Před 2 lety +4719

    Throwing a hashmap at the problem when you're stuck is actually pretty good advice, it's a powerful structure that will save your ass many times.

    • @nicholast
      @nicholast  Před 2 lety +303

      facts

    • @titord6031
      @titord6031 Před 2 lety +109

      What is a hashmap?

    • @milos5247
      @milos5247 Před 2 lety +299

      @@titord6031 a collection of key-value entries, also known as just map or dictionary.

    • @Loachie90
      @Loachie90 Před 2 lety +83

      @@titord6031 hashmaps are like unordered sets in the mathematical world. Lookup times are O(1), but only unique key values are allowed.

    • @TheChangeYT
      @TheChangeYT Před 2 lety +7

      But you have more data plus you need to hash everything right?

  • @kered13
    @kered13 Před 2 lety +12423

    As an interviewer: This is 100% accurate. However, don't waste time coding the slow solution. It's fine to mention it, but if you know a faster solution go straight to that before coding.

    • @dhruvakhera5011
      @dhruvakhera5011 Před 2 lety +58

      nice

    • @nathanfisher9933
      @nathanfisher9933 Před 2 lety +13

      @@dhruvakhera5011 nice pfp

    • @djtecthreat
      @djtecthreat Před 2 lety +425

      Came for this comment. Put your best foot forward, I'm looking at you as a complete candidate who tries to solve problems the best way you know how. Much better than a fake crappy approach just because you know the "can you improve this?" question comes next.

    • @mdouet
      @mdouet Před 2 lety +174

      While I agree with this, that was the interviewer's fault for asking him to code a brute force solution instead of asking for an optimal solution before he started coding.

    • @whereDoCarrotsComeFrom
      @whereDoCarrotsComeFrom Před 2 lety +144

      @@mdouet he never said brute force or slowest, the interviewer just asked for a solution

  • @MultiBillionaire_Motivation007

    This is way of showing people how tech interview works with kind of melodrama is brilliant idea wise, appreciated 👏

  • @Charles-sy7ej
    @Charles-sy7ej Před rokem

    Dude! This intro is priceless!!! Just getting into web development wanted to know what coding interviews are like and this is the first video yt recommended!

  • @1314pankaj
    @1314pankaj Před 2 lety +6424

    I own an IT company. When we take interviews we allow candidates to use Google or any other resource. We hire people even though they failed technical. The most important thing for us is willingness to learn.

  • @anad.1594
    @anad.1594 Před 2 lety +9964

    New comp sci student here. I either will be back in a few years to say “haha, true” or I’ll have changed careers. Regardless, great vid.

    • @dianna9182
      @dianna9182 Před 2 lety +384

      feeling the same way lol !! it’s my first year and i’m watching all these

    • @Sid-xt3kt
      @Sid-xt3kt Před 2 lety +47

      Same here haha

    • @gc1087
      @gc1087 Před 2 lety +230

      Lol. After I graduated and tried to get a job. I changed career fields and went to IT/Engineering. Software developer interviews are so garbage. Good luck!

    • @darthvader9851
      @darthvader9851 Před 2 lety +151

      Same 1st year cs here, i can barely comprehend the code lol,

    • @sumairakhan9980
      @sumairakhan9980 Před 2 lety +52

      @@gc1087 i was thinking of going into project management. i think its where my skills r best applied n i know im not gonna be a genius coder prob j average

  • @algorithmist5620
    @algorithmist5620 Před rokem

    This is a great video ! Not only funny, but I actually learned something too.
    I wouldn't have thought of that hashmap solution

  • @simplehonestmusic2261
    @simplehonestmusic2261 Před rokem +20

    So the trippiest thing is one year ago I watched this video when I was researching pursuing a career in coding, and now one year into learning to code I am slowly learning about Hash maps, and watching this video again, I actually, to an extent, understood what you were talking about!

  • @Jokamutta
    @Jokamutta Před 2 lety +2546

    I thought it would end like "Thanks for fixing our coding problem. Thanks, bye!"

    • @nicholast
      @nicholast  Před 2 lety +183

      that would've been good 😂

    • @NotAMystery
      @NotAMystery Před 2 lety +6

      Exactly what I was thinking!

    • @ieaturanium574
      @ieaturanium574 Před 2 lety +29

      If solving one problem for free for them would be annoying, imagine working for them making maybe tens of thousands while they potentially make billions off of your work, and you're not even allowed to work anywhere else

    • @LaughingBearGames
      @LaughingBearGames Před 2 lety +7

      I always imagine that’s how these go. You’re actually solving bug tickets for them in prod.

    • @Jokamutta
      @Jokamutta Před 2 lety +1

      Wow so many likes! Ty guys hah :D

  • @isaiahdeck8747
    @isaiahdeck8747 Před 2 lety +4748

    When you’re in your third year of being a computer science student and don’t understand a word being spoken🥲

  • @aylith663320
    @aylith663320 Před rokem +34

    The main thing to take away from these interviews is that you will always be questioned on your solution to the problem. Invariably you will be able to improve it to some degree, the interviewer just wants to see if you know how. From my experience when I didn't know something it wasn't a bad thing, it was just a way to find the extent of my knowledge. I got good feedback about my solution after the interview and got the job. So when you are in this situation be calm, do the best you can and if you don't know something then don't worry about it, worst case scenario is you don't get the job and you never see that interviewer again.

  • @ih8r2
    @ih8r2 Před rokem +2

    was first watching for leisure before my technical interview. and I did get stuck, and that line came into my mind - "Throw a HashMap to the problem" and it worked! Coming back here to say Thank You as the HashMap solution really saved my ass!

  • @meganlukes6679
    @meganlukes6679 Před 2 lety +3794

    I’m terrified of the coding interview. I’ve always had horrible performance anxiety, once someone’s watching me my mind goes blank. During a practice coding interview with an instructor he had to remind me that for loops are a thing 😭

    • @AmanDeep-rk6je
      @AmanDeep-rk6je Před 2 lety +96

      I feel the same thing 😭

    • @RocketVet
      @RocketVet Před 2 lety +242

      I was in a pricey bootcamp and didn't have much further to go with it. I wasn't enjoying it at all. Learned to hate coding when trying to make it a more serious career. Once I found out how the interview process worked and what to expect I was done - dropped out and went and changed careers again to something else I like better. Happy I did! Landed one of my other dream jobs.

    • @considerphi
      @considerphi Před 2 lety +113

      Just practice with someone (who codes) watching you code. Practicing control of your anxiety and mind state is half the battle.

    • @Pulsed101
      @Pulsed101 Před 2 lety +40

      @@RocketVet What did you change too?

    • @RocketVet
      @RocketVet Před 2 lety +101

      @@Pulsed101 I hold certifications in personal training, health, coaching/CBT. I went into social work doing life coaching classes and case management. Feels great helping people again!

  • @Arcvx
    @Arcvx Před 2 lety +3737

    I know this is supposed to be for entertainment but as a CS student this just makes me wanna die and dread having to do an interview like this lmao

    • @mightytgaming3
      @mightytgaming3 Před 2 lety +226

      Bro I thought I was the only one 🤣😭

    • @Alyzbane
      @Alyzbane Před 2 lety +209

      I'm only freshman and worries always filled me

    • @albertocalabrese2958
      @albertocalabrese2958 Před 2 lety +357

      Only FAANG does this. For Junior positions, smaller companies ask you more about logic, some questions about CS knowledge like polymorfism etc. They also ask you to solve real-life problems so they can see if you're willing to learn and if you actually ever wrote a line of code. Don't worry too much ;)

    • @aduhaneh1057
      @aduhaneh1057 Před 2 lety +156

      for junior engineers i recommend practicing easy - medium problems leetcode (they have filter for top interview questions) as you work on harder problems you will learn more neat techniques. don't wait till you graduate, especially if you're aiming for top companies, though if u aim for small companies I'd still recommend you practicing in case you change your mind (never a bad thing to keep options open).

    • @AonyjsViolmlar05
      @AonyjsViolmlar05 Před 2 lety +8

      @@aduhaneh1057 even though i already have experience as developer this kind of stuff will surely improve my skill. Thanks for the idea.

  • @leonng9926
    @leonng9926 Před 2 lety

    Good job Nick. Always a easy way out of all the problems

  • @StarsiteProgrammers
    @StarsiteProgrammers Před rokem +2

    Since the day I started to work with you, I know I've changed a lot which really helped me to become a better person inside and out. You are one of the reasons why I'm always trying my best. Thank you so much You know I appreciate you so much.

  • @aaronsalenga3221
    @aaronsalenga3221 Před 2 lety +2065

    I’m literally watching this right before a coding interview.
    May the power of the hash map be with me.

    • @guilhermepoleto4989
      @guilhermepoleto4989 Před 2 lety +17

      So, you did it?

    • @bapemanyo
      @bapemanyo Před 2 lety +8

      u did it?

    • @alinaertsd
      @alinaertsd Před 2 lety +47

      as a cs student, i need to know of you got the job

    • @kchannel5317
      @kchannel5317 Před 2 lety +100

      Ssssshhhhh guys, he's on his 69th interview. He doesn't know if he'll make it yet.

    • @hhao7310
      @hhao7310 Před 2 lety +21

      I’m having an tech interview in two days also, wish me good luck

  • @RoMD
    @RoMD Před 2 lety +3928

    I literally have no idea what he’s saying for this entire clip. 😂

    • @nicholast
      @nicholast  Před 2 lety +795

      me too

    • @danielpaulo2119
      @danielpaulo2119 Před 2 lety +92

      Just keep following the script

    • @brozobronze9821
      @brozobronze9821 Před 2 lety +176

      Same here....and im a 3rd year I.T student

    • @clarisse603
      @clarisse603 Před 2 lety +67

      First year Computer Engineering student here, and surprisingly I understood everything he said owo

    • @shaunguo1165
      @shaunguo1165 Před 2 lety +40

      @@clarisse603 Basically just data structure and algorithm plus something like dynamic programming ?CE major here too, and I only got to these during my second year cuz I didn't take useful APs 😭

  • @thedevguild7525
    @thedevguild7525 Před 2 lety +2

    Wow can't believe you are actually going through the real solutions! Nice!

  • @rlar4652
    @rlar4652 Před 2 lety +2

    Wow, your video is awesome.
    Not boring like other tech videos.

  • @carlocorallini9090
    @carlocorallini9090 Před 2 lety +726

    Me who just started to learn about for loops:
    "I like your funny words magic man"

    • @kitcat2449
      @kitcat2449 Před 2 lety +3

      ...what return new int[] {i, j} does...returns an array with... i and j? But what's that "{ }" :'D

    • @T355V
      @T355V Před 2 lety +2

      @@kitcat2449 "i" and "j" are the elements in the array! the curly brackets just show that those are the elements

    • @kitcat2449
      @kitcat2449 Před 2 lety

      @@T355V thank you! I actually took java classes recently so now it makes sense, but I appreciate the clear answer 8)

    • @T355V
      @T355V Před 2 lety +1

      @@kitcat2449 yeah no problem! glad you're taking classes haha~

    • @PurpleSaturn726
      @PurpleSaturn726 Před 2 lety

      I’m currently on my final exam for Java as we speak! I’m deciding to do a choose your own adventure game, but it’s a bit hard for me to make the user go from a separate choice to a preexisting choice. Definitely easier said than done though, eheheh…

  • @jesselangham
    @jesselangham Před 2 lety +1496

    I've been a software developer for 16 years. I've been through plenty of code interviews and I've almost never given the best solution. Know why? Because nothing I've done of any quality is done inside 45 minutes. I just don't stress the first pass. If they're looking for perfection after 45 minutes, they're just looking for people who probably already got the correct answer online beforehand.

    • @nicholast
      @nicholast  Před 2 lety +314

      they just wanna know if you've been grinding your leetcode 😂

    • @marcuscasagrande7596
      @marcuscasagrande7596 Před 2 lety +12

      I think I will just say that on my next interview, actually. Thanks!

    • @d3ly746
      @d3ly746 Před 2 lety +20

      @@marcuscasagrande7596 tell us if you got the job lol

    • @culhwch4168
      @culhwch4168 Před rokem

      Why did you quit the career?

    • @BigBrother4Life
      @BigBrother4Life Před rokem

      God bless you, you seem to have a nice family.

  • @reisecat782
    @reisecat782 Před rokem +2

    Man, by this video you helped me to pass my own code interview, really

  • @revertrohan
    @revertrohan Před 2 lety

    I got this question in my interview today and your video suggestion earlier. Should have watched then.

  • @nicholast
    @nicholast  Před 2 lety +70

    why is youtube recommending this to so many people 4 months after i posted it??

    • @prasad1608
      @prasad1608 Před 2 lety +3

      Lol ...I once saw a 11 years old video in my recommendation

    • @kelton8852
      @kelton8852 Před 2 lety +1

      graduates bro

    • @mr6462
      @mr6462 Před 2 lety

      I just graduated and started my leetcode grind, and my CZcams feed become all cs videos and I got this video recommendation

  • @liechy
    @liechy Před 2 lety +1348

    I swear I thought I was watching myself here, I was literally asked this same question a few weeks ago during my last interview. My approach was pretty similar and I ended up throwing a hashmap at the problem as well. I was able to move on to the next round of interviews because of it, and then later on I eventually got the job.

    • @nicholast
      @nicholast  Před 2 lety +184

      wow congrats!! so funny how the stories are so similar 😂

    • @jordan.j4064
      @jordan.j4064 Před 2 lety +19

      Dude how did you make it through lol, im having a hard time passing the 1st tech interview, did you study some data structures beforehand?

    • @liechy
      @liechy Před 2 lety +61

      ​@@jordan.j4064 Pretty much yeah. Before I got my first job I had a hard time with tech interviews too. I kept failing and failing them but with each failure I learned more about the areas I was weak in and focused in on that. Soon enough I was able to get more comfortable with interviews and I ended up managing to land my first job with a lot of effort. Honestly though, just keep sending out applications, keep pushing yourself to improve and learn from your mistakes, and soon enough you'll be able to make it through.

    • @bigchungus6546
      @bigchungus6546 Před 2 lety +1

      @@liechy does gpa matter?

    • @liechy
      @liechy Před 2 lety +41

      ​@@bigchungus6546 honestly it doesn't really matter. What really does matter though is actual experience. If you're still in school, shoot for an internship. If you've already graduated, start building out side projects and work on your interview skills.

  • @ashlar64
    @ashlar64 Před rokem +3

    Love the video...i just got a new software developer position. It just took 1 HR phone screen. Two code tests on a coding test websites. Three brutal technical interviews where I created 2 mobile apps and I finally got the position after a total of three weeks. I have a friend who is a nuclear physicist and it took a single 30 minute phone interview to get a position at a nuclear power plant. I do not know any other career field where the interviews are as tough as in software developing.

  • @Crunchy_Nachos
    @Crunchy_Nachos Před 2 lety +17

    Wow this is so accurate, ive had like 3 interviews for the same company before finally getting the job.
    The best tip I could give is to not be sad if you dont ace your interview. Always try to learn from failiures and never say you know something that you cannot explain.
    :)
    Good luck

  • @RudyPhile
    @RudyPhile Před 2 lety +1876

    Fun Fact:- " _This guy just cracked the formula of making humour out of no humour_ " 😂😂

    • @nicholast
      @nicholast  Před 2 lety +58

      😎 😎

    • @afreentaj3648
      @afreentaj3648 Před 2 lety +48

      You mean _cracked the code_ ?

    • @NeostormXLMAX
      @NeostormXLMAX Před 2 lety +9

      This is what you call kafkaesque, when the industry is so absurd that, that in itself is absurd

    • @user-ri2ms2mm7w
      @user-ri2ms2mm7w Před 2 lety

      My friends, search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life--
      czcams.com/play/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-.html

    • @AmberyTear
      @AmberyTear Před 2 lety

      Russian comedians: am I a joke to you?

  • @kungfungify
    @kungfungify Před 2 lety +748

    Me pretending I know what he's talking about: "Ahh yes...The ol' indexing the corresponding indices for the core value of zero sum. Brilliant."

    • @nicholast
      @nicholast  Před 2 lety +181

      Smile and wave boys, smile and wave

  • @Trillykins
    @Trillykins Před 2 lety +10

    Lol, when he mentioned to throw a hashmap at it I immediately thought back to one interview question I got where I bongled it because I didn't think to use a hashmap to get linear runtime until after the interview was over and it was this exact problem. I hate code interviews for the same reason I hate oral exams. If you don't immediately know the solution you're just fucked and if you're the type of person who gets nervous at oral exams you're just at a huge disadvantage compared to someone who doesn't get nervous. I mean, it's not like you'll ever be in a situation at your job where you have five and only five minutes to conjure up and code up a solution to an algorithm. Anyway. Fun and relatable video.

  • @pickledpenny604
    @pickledpenny604 Před 2 lety +207

    As someone who is only a couple months in to learning, this absolutely terrifies me lol

    • @superpantman
      @superpantman Před rokem +19

      I’m new to coding but I honestly doubt unless you’re going into a very lucrative role they would ask this type of question under pressure. As others have said, no decent code is produced in 5 minutes and certainly not under pressure.

    • @durza9390
      @durza9390 Před rokem +11

      Don't stress it luv, plenty of opportunities to learn and do not be affraid of failures. Simply learn from them and continue your journey :)

    • @maple_vanilla
      @maple_vanilla Před rokem +4

      @@durza9390 lol is it a failure if I can't even get hired for IT support/office work. Can't find shit for an entry level job 😭

    • @anunknownperson4018
      @anunknownperson4018 Před rokem +6

      Same 😢 im a beginner in coding and it terrifies me

    • @ICxrsedII
      @ICxrsedII Před rokem +1

      @@anunknownperson4018 sameee

  • @warrior100girl
    @warrior100girl Před 2 lety +1801

    The joke is. After this you will never ever do anything like this again. Because most of the time you will develop some restAPI.

    • @kern6365
      @kern6365 Před 2 lety +83

      well thats only for backend, as a FE, I never built a single API endpoints in company tasks lol, neither did I encounter and stuff like interview questions again in my years of career

    • @nicholast
      @nicholast  Před 2 lety +891

      *studies data structures + algorithms for months*
      gets paid to center divs

    • @soluna1679
      @soluna1679 Před 2 lety +169

      sorry but your div fucked up the whole site

    • @nicholast
      @nicholast  Před 2 lety +215

      bruh moment

    • @PaulMcCannWebBuilder
      @PaulMcCannWebBuilder Před 2 lety +130

      @@nicholast As a CSS specialist, I've been centering div's for 20 years. Except these days the styles are declared somewhere in a HashMap.

  • @bharat_thapa_
    @bharat_thapa_ Před 2 lety +2810

    in school: 2+2 = 4
    in exam: What is the mass of Sun?
    in coding interview: solve complex problems.
    in job: data entry 😅🤣😬😬😒😒
    Edit: WOW so many likes!
    Thank you guys 😍🤩

  • @redicecreamcone7546
    @redicecreamcone7546 Před 2 lety

    I watched this video about a year ago. Coming back and watching it now on a whim I realized I understand what they're talking about now. Feels good :)

  • @krishchauhan4675
    @krishchauhan4675 Před rokem

    A year ago I watched your video. Didn’t understand a word you said. Now when I watch this video I understand and have done exactly what he did!🎉🎉

  • @nicholast
    @nicholast  Před 2 lety +200

    5k likes for part 2 👀

    • @CyberMew
      @CyberMew Před 2 lety +1

      Throw hashmap at the problem sometimes really work lol. Can't wait for next tip!

    • @SirMinelli
      @SirMinelli Před 2 lety

      I'm beginning my coding journey and watching this scared the crap out of me.

    • @critio8824
      @critio8824 Před 2 lety

      Done

    • @dtr579
      @dtr579 Před 2 lety

      I absolutely didn't understand anything all of you were saying, so I guess I'll never get hired as a coder.

  • @pranjali1411
    @pranjali1411 Před 2 lety +307

    When you said "There's more??!!!! "
    I felt that 😢

    • @nicholast
      @nicholast  Před 2 lety +19

      there's always more :(

    • @MegaOfficeHours
      @MegaOfficeHours Před 2 lety +27

      @@nicholast Wave 4 of interviewing... Interviewer: "Wow, looks like its been 6 weeks since our first meeting. Unfortunately, at this point in time we will be moving forward with other candidates."

    • @GrinFlash007
      @GrinFlash007 Před 2 lety

      @@MegaOfficeHours I'd rather be a fish if I'm gonna get gutted like that 😂

    • @MegaOfficeHours
      @MegaOfficeHours Před 2 lety

      @@GrinFlash007 I got a CompSci degree and quit looking for jobs after a few of these.

    • @MegaOfficeHours
      @MegaOfficeHours Před 2 lety

      @@Egg-vv8de which part lol. Wave 4 of interviewing or giving up on finding a software job?

  • @cirogarcia8958
    @cirogarcia8958 Před 2 lety +9

    "Throw a hashmap at the problem" is my standard first approach to any problem involving arrays. Now I know I'm not just weird

  • @40NoNameFound-100-years-ago

    I have really learnt alot from this video, Nick 😃👍

  • @wonderstruck.
    @wonderstruck. Před 2 lety +651

    "Just throw a hashmap at the problem"
    My algos professor: "Nope find an O(1) solution"

    • @mystic839
      @mystic839 Před 2 lety +38

      this was actually a solution that was desired from me once: the best answer was to generate a lookup table beforehand, and just use that in the live code.

    • @DeezNuts-zx3ih
      @DeezNuts-zx3ih Před 2 lety +52

      “Fuckin uh… just take the first two and hope that its right”

    • @obamabinladen5055
      @obamabinladen5055 Před 2 lety +10

      use a hashmap, lol key = input, value = pre-programmed desired output.

  • @jonathanmilien9075
    @jonathanmilien9075 Před 2 lety +401

    This hit me on a cellular level. LOL

  • @pyserialkiller110
    @pyserialkiller110 Před 2 lety +1

    I love the linear time solution. Is the perfect example of a simple, clean and clever idea

  • @kiranbailey-stokes1044

    When I saw the question I paused it and came up with using a map, love that you came up with the same solution

  • @tylerfunnyman2532
    @tylerfunnyman2532 Před 2 lety +493

    I’ve been debating about going into coding for a couple months now. Thank you for this u-turn 😂

    • @nicholast
      @nicholast  Před 2 lety +123

      nah u should try it

    • @Tezzilove
      @Tezzilove Před 2 lety +4

      😂😂😂

    • @PoeticComments
      @PoeticComments Před 2 lety +17

      No the u turn 😭😂

    • @lalala-lt8fe
      @lalala-lt8fe Před 2 lety +37

      I've been working as a programmer for nearly 10 years and I've never had an interview like this. It's an extremely broad field, it isn't all like this.

    • @Joe-fj6dj
      @Joe-fj6dj Před 2 lety +5

      @@lalala-lt8fe let me guess you doing front end?

  • @grantdong7746
    @grantdong7746 Před 2 lety +246

    I was expecting a joke of a video, but this was actually extremely helpful as a CS major.

  • @skyborne6393
    @skyborne6393 Před rokem

    Lol. I really like these videos. This is exactly like the engineering interviews. Especially the oh I just did this problem last night but I will pretend this is my first time seeing it.

  • @mokhlesurrahmanmahin4561

    That very famous two sum problem from leetcode. haha. I would have directly jump into the Hash Map for sure. Thanks bro for teaching me this ninja technique. :D

  • @MrBenny1010101
    @MrBenny1010101 Před 2 lety +83

    I love how the guy just awkwardly walks away without further explanation, even though the person he was explaining to was clearly still confused. And he literally is walking to nowhere.

  • @neil2300
    @neil2300 Před 2 lety +47

    Interviewer - MAKE A TIME MACHINE
    ME- What ?
    Interviewer - Too late, *Rejected*

  • @TheScottishDad
    @TheScottishDad Před 2 lety +279

    Software engineer here - I didn't follow all of that.
    I have been writing code for almost a decade now across several large companies using a variety of frameworks and languages. All I can say is that not once in my career have I ever had to solve anything like this.
    I've also hired developers in on my post as a dev manager and scrapped the tech test as my first move. I care more about their ability to learn and attitude than how well they can remember academic-type questions and answers. They need to understand code and how to solve problems, but I'd rather have a someone on the team that can pick that up quickly and can demonstrate some fundamentals than someone who can rattle off 'coding exercises'. The reality is, most jobs are bug fixes and you'll likely never encounter such BS

    • @USFighter
      @USFighter Před 2 lety +12

      You've never worked for big tech like Google, Twitter or Facebook. I agree with you. Im a senior software engineer for about 7 years and a database administrator before that. When I interview, I throw out a couple feelers to make sure you can code but never anything like this. I usually stick to past experiences and let them know what our past current and future projects might be and ask them for insight on how they would handle some of the issues I've had or foresee. I have never had a bad hire using those methods (I've hired 10 developers in my career all have been with me over a year and did fantastic work)

    • @GrantH2606
      @GrantH2606 Před 2 lety +1

      @@USFighter I'm 27 years old, haven't held a job in years and got a bit lost in life. I feel like I want to go the software developer/engineer route. Where would you suggest someone like me with near to none experience should start?

    • @howardbaxter2514
      @howardbaxter2514 Před 2 lety

      @@GrantH2606 first off, what are your interests?

    • @GrantH2606
      @GrantH2606 Před 2 lety

      @@howardbaxter2514 I do not know what my interests are career-wise, I just know labour isn't it. Idk how I'm supposed to know what my interests are...

    • @thenerdofalltrades8190
      @thenerdofalltrades8190 Před rokem +7

      @@GrantH2606 Ideally, you’d find a career in something that interests you. So what do you like doing? How do you spend your free time? If the answer is “playing video games,” it’s unlikely you’ll get a job doing that, though it is possible, but maybe you want to get into video game design. You have to do a lot of research, find CZcams videos on careers in fields that interest you, and see what the jobs are like. I know people in their 50s that still haven’t figured out what the hell they’re doing. Try not to stress about it too much, and try different things if you can.

  • @oathpeterson
    @oathpeterson Před 2 lety

    😁 I have no idea about coding but enjoy your video, also share this to a friend
    who is learning to code and going to interview for boot camp or something, not sure

  • @kibe2134
    @kibe2134 Před 2 lety +75

    I came for a quick joke and ended up learning about hashmasps and having a Big Time Rush nostalgia trip. Sub.

  • @nicotinedealer7653
    @nicotinedealer7653 Před 2 lety +153

    I had the "throw a hashmap at the problem" awakening only yesterday. Code works in mysterious ways.

  • @cenkercanbulut3069
    @cenkercanbulut3069 Před 2 lety

    Good. One more video to show for my students about why Data Structures are maybe the most important topic of efficient Software development

  • @hawkeyebricks9905
    @hawkeyebricks9905 Před rokem +3

    I'm glad I've been working at the same company since I graduated 22 years ago because I would not be able to code up something with someone watching over my shoulder in an interview setting. But I do agree... whenever you're stuck the solution probably involves a HashMap.

  • @JasonWangooo
    @JasonWangooo Před 3 lety +256

    No idea what anything you said meant but I was very invested into the video. 10/10 acting, would recommend

  • @mdouet
    @mdouet Před 2 lety +53

    That part where he didn't know what to do next and just kept saying "uh" over and over really hit home, lol.

  • @NiNGalaxU2
    @NiNGalaxU2 Před 2 lety

    Loved the Big Time Rush Outro at the end 👌🏼

  • @amandapanell2857
    @amandapanell2857 Před rokem +2

    Just came back here for your explanation of how the two pointer approach works for Two Sum, thanks :D

  • @tyranitarxd2819
    @tyranitarxd2819 Před 2 lety +450

    it was harder to come up with that 2nd solution than the hashmap solution

    • @michaelaramis1210
      @michaelaramis1210 Před 2 lety +43

      the other day i did a technicall interview, i felt ashamed to use a hashmap for both question, i thought i was being dirty

    • @superdingo9741
      @superdingo9741 Před 2 lety +15

      ​@@michaelaramis1210 the other day I interviewed a guy and he didn't even know how a regular array works and how writing to a variable happens under the hood. And he had a year of expirience as a software ingeneer. So if you know what the hash map is and able to apply it in suitable places, you are a better than many out there and have nothing to be ashamed of.

    • @michaelaramis1210
      @michaelaramis1210 Před 2 lety

      @American Hero yeah, heavily!

    • @michaelaramis1210
      @michaelaramis1210 Před 2 lety

      ​@@superdingo9741 i was refering that i felt dirty on using my hammer to nail every problem :P but i do get your point, it has taken many years for me to validate myself as a developer and still theres plenty of room to grow
      ive done cloud apps, mobile, desktop, architected backend and frontend software, lead small teams of developers...
      still to this day i dont feel that i could fit on a large company

    • @prateeksingh-hp4qd
      @prateeksingh-hp4qd Před 2 lety

      @@superdingo9741 Wow that's reassuring 🤧

  • @lindh2126
    @lindh2126 Před 2 lety +172

    And from all us coders out there, here is the real answer: "No problem sir, let me just google that for you!"

  • @azurite1282
    @azurite1282 Před rokem

    2 years ago when this video first came out, I had no clue what he was talking about nor the problem at hand. Now I can't believe I can now actually understand everything that's being talked about in this video!

  • @BadBanana
    @BadBanana Před rokem

    That's pretty advanced knowledge from where I'm sitting
    Nice video

  • @youreadisgracepod
    @youreadisgracepod Před 2 lety +146

    That “hmm good question. Uh, I, uh, well instead of doing what we did…” was one of the most relatable things I’ve ever heard. I don’t do coding anymore since I’m ass at it and straight up don’t like it and this video was so accurate

  • @princeelliot2836
    @princeelliot2836 Před 2 lety +50

    I'm currently studying for my exam in algorithms (mostly time complexity). Thank you for giving me shortcuts with this video.

  • @turtlecode
    @turtlecode Před rokem

    thanks for advices 🙏

  • @MazorKuziaki
    @MazorKuziaki Před 2 lety +1

    Just watching this video at the beginning of learning my first language. Going to watch again in 6 months to see how much more I understand.

  • @ChiEKKUsama
    @ChiEKKUsama Před 2 lety +39

    "Could you make it faster?"
    "I'm sure we could, let's discuss it during tomorrow's stand-up; I'm sure the team will have some input. After all, this won't go into production for 3 months, so we have lots of time to refine it."

    • @nicholast
      @nicholast  Před 2 lety +8

      “That would be a cross-functional effort requiring 10 engineers and 4 weeks. Let’s keep it in the backlog for now”

  • @Cowtymsmiesznego
    @Cowtymsmiesznego Před 2 lety +146

    Interviewer: And... you can just assume that the solution always exists.
    Nick: I'll pretend I didn't hear that.

  • @satou9508
    @satou9508 Před rokem

    Just saw this now and this is making me motivated lol

  • @kirkshammett94
    @kirkshammett94 Před 2 lety

    Start d learning some coding yesterday. Have no clue what the fuck you are talking about in this vid but I like it!

  • @WhatIsThis-zq4hk
    @WhatIsThis-zq4hk Před 2 lety +116

    _*5 minutes later *_
    After careful consideration of your impressive resume and interview performance, we have decided to make the difficult and gut wrenching decision to move forward with other candidates whose skills more closely align with the needs of this position at this time. We greatly appreciate your time and we hope that you continue to follow our posted job opportunities in the future.

    • @chichichichichichiOwO
      @chichichichichichiOwO Před 2 lety +3

      Someone's been rejected a few times before

    • @eulr7915
      @eulr7915 Před 2 lety

      like this

    • @von...
      @von... Před 2 lety +3

      tbh I would rather them fully vibe check me & read every single 'less than ideal' comment from the interviewer.
      like "Honestly, this guy uses the term 'ostensibly' & 'thus' far too frequently. I will quit if you hire him on my team" & being somewhat petty, is something I would prefer to corporate nice-speak.
      Oh btw for anyone who reads this & thinks "same": I have had good luck in getting real feedback by reaching out to interviewers via linkedin or github (note: not their @work emails), but I am careful to not be weird about it lol

  • @jaquesadv
    @jaquesadv Před 2 lety +84

    Man, congratulations for your achievements!!! Only you know how really hard it was for you to get to be where you are now! 🙏🏽 God keep blessing you and your goals!

  • @ngametuatuaputa1404
    @ngametuatuaputa1404 Před 2 lety

    I had no idea what you were talking about the whole time, but now I wanna learn

  • @fernandov.3302
    @fernandov.3302 Před rokem

    I felt dumb af because my brain started kind of blurring some of the stuff you were saying, but hearing pairs and my first thought being HashMap and it coming up actually made my day. We take these wins, no matter how small....

    • @syntaxicalecho8281
      @syntaxicalecho8281 Před 11 měsíci

      Lol, at least you did better than me, up until I saw this video I only knew Hashmaps as Dictionaries

  • @firefly21111
    @firefly21111 Před 2 lety +29

    Perfect example of programming interview hell. "Draw me the Mona Lisa" they said, then you get the job and end up painting a fence.

    • @folou9199
      @folou9199 Před 2 lety +2

      Guess that's why you just learn to draw Mona Lisas as per usual for these types of interviews to prepare for fence painting jobs, like everyone else. Sad, but true for a lot in life.

    • @von...
      @von... Před 2 lety +1

      @@folou9199 me rn.
      99% leetcode + 1% cramming to remember:
      The details of my own significant side-projects, various role & language specific info, & how to actually talk to a new person while constantly switching between high-level general overviews & low-level explanations while being concise.
      ADHD has been good to me while I am actually writing code, but boy is it rough when interviewing & prepping for interviews... I also am afraid to mention I have it just in-case someone lowkey passes on me because of it.

    • @Kevin-James4.6
      @Kevin-James4.6 Před 2 lety

      You're hilarious!

    • @zhengyang1581
      @zhengyang1581 Před 2 lety

      In China we call it "building a rocket in the interview and twisting screws in the job" lol

  • @tannerbarcelos6880
    @tannerbarcelos6880 Před 3 lety +452

    Hashmaps really do save you though lmao

    • @nicholast
      @nicholast  Před 3 lety +35

      Facts

    • @prabeshhumagain1008
      @prabeshhumagain1008 Před 3 lety +25

      Yeah, basically a time-memory trade-off.

    • @placeholder_name321
      @placeholder_name321 Před 2 lety

      @@prabeshhumagain1008 is a hashmap like a Regular Expression

    • @ohtexankorean5567
      @ohtexankorean5567 Před 2 lety

      @@placeholder_name321 no, hashmaps store keys and value pairs. Keys can be mostly anything, but in the interview he stored the complement integer as a key and the index as a value. You can look up keys in constant time. Regular expressions is used to find things in a certain format you specify. Regular expression do not store anything you found

  • @brrrrr256
    @brrrrr256 Před 2 lety +1

    I got into programming when, If you could do it - you get you the job.
    I actually understand the O-notation he's referring to. Measures of algorithm complexity. Woo Hoo!
    Love to interview these guys.

  • @brianmweu6460
    @brianmweu6460 Před 4 měsíci

    Very nice you're a genius!

  • @Sky4Jus
    @Sky4Jus Před 2 lety +89

    "Yup, that sounds like a good start"
    "That's my entire code"
    "Bruh"

  • @sabrinabetancourt9965
    @sabrinabetancourt9965 Před 2 lety +587

    I’m literally a nursing major, idk how I ended up here or what you’re saying but it sounds about right 😂

    • @jet5995
      @jet5995 Před 2 lety

      You like it?😭

    • @samiamohamed683
      @samiamohamed683 Před 2 lety +10

      I feel you, I study biochemistry and this sounds foreign to me.

    •  Před 2 lety +2

      hahahahahahha

    • @alecaceres9922
      @alecaceres9922 Před 2 lety +4

      I’m taking a veterinarian course how did we get here

    • @narzg2432
      @narzg2432 Před 2 lety

      HAHAHA lol, there's one thing you could understand about us just study ABOUT US HAHA

  • @tongtongqi1632
    @tongtongqi1632 Před 2 lety +3

    Just fyi, there is actually a trade-off between the 2 solutions; neither is more optimal than the other. The second solution, even though faster, takes extra space. A better script can be asking the clarification question first ("Is the array sorted?") and then propose both solutions depending on different conditions.

  • @josephflanagan8957
    @josephflanagan8957 Před 2 lety

    This video actually helped me in an assessment i got stuck and threw a hashmap at the problem and it worked