Coding Interview | Software Engineer @ Bloomberg (Part 1)

Data structures website: keeponcoding.io
Part 2: • Coding Interview | Sof...
Instagram: / keep_on_coding
Discord: / discord
My Gear: amazon.com/shop/keeponcoding

Пікірлер: 2 100

  • @KeepOnCoding
    @KeepOnCoding Жыл бұрын

    Try our new data structures website: keeponcoding.io

  • @druvak
    @druvak3 жыл бұрын

    I've been a software engineer for 24 years. I've never ever needed to write a binary search function.

  • @JM-gz1ej

    @JM-gz1ej

    3 жыл бұрын

    exactly

  • @slayerzerg

    @slayerzerg

    3 жыл бұрын

    yea but it's straight forward should be simple for ya

  • @troshenkov

    @troshenkov

    3 жыл бұрын

    Companies do not have the time and qualifications to test the professional knowledge of hired employees. To get into Google or Facebook, you need to learn how to pass interviews. In fact, any Indian seller of Seven-Eleven knows how to pass an interview with these IT companies in Silicon Valley. My roommate with 10 years in journalism learned algorithms and trained to pronounce their solutions in English, he got a job in Apple. People who are 15, 20, 30 years in the profession, this leads to dissonance.

  • @SuddenHamster

    @SuddenHamster

    3 жыл бұрын

    @@troshenkov This is complete bullshit. If Google or Facebook would hire every Seven-Eleven guy those companies would never be the richest companies in the world, they would be a Seven Eleven. The only reason why they are the richest companies in the world because they hire the smartest people possible. In the field of computer science and software engineering there is no better way to determine how good you are then asking to solve an algorithmic problem. You roommate is probably a very smart guy or he has been hired on non-engineering position (which are plenty in companies like Apple etc.)

  • @troshenkov

    @troshenkov

    3 жыл бұрын

    ​@@SuddenHamster Do you know why there are so many interview courses? This is a huge business.

  • @TheAbhorrent1
    @TheAbhorrent13 жыл бұрын

    This is ridiculous I've been a binary search tree for 30 years and never once have I had a software engineer traverse me.

  • @Lucas-iv6ld

    @Lucas-iv6ld

    3 жыл бұрын

    Real IT Market (95% plus) is about doing a complex CRUD... everything would be a CRUD, even through a REST operation, in the end it's just a complex CRUD. Don't be fooled by those interviews.

  • @BillClinton228

    @BillClinton228

    3 жыл бұрын

    @@Lucas-iv6ld I'm convinced these algorithm interviews are about the Lead flexing on strangers.

  • @beastmasterbg

    @beastmasterbg

    3 жыл бұрын

    that would be sexual harrasment :D

  • @TheGhost094

    @TheGhost094

    3 жыл бұрын

    @@BillClinton228 yeah exactly. It's just an elaborate dick measuring contest.

  • @chickenkm

    @chickenkm

    3 жыл бұрын

    how can you be a tree?

  • @pranjaldoorwar9743
    @pranjaldoorwar97433 жыл бұрын

    Interview: Search a binary tree. Job: Please make CTA blue, client said her favorite color is blue.

  • @nichtbonus526

    @nichtbonus526

    3 жыл бұрын

    5

  • @cloudy-head

    @cloudy-head

    3 жыл бұрын

    @@nichtbonus526 nahh 6

  • @FF18Cloud

    @FF18Cloud

    2 жыл бұрын

    Well, this is Bloomberg, so, the clients would here would be their UX department trying to tell you why you have to move a div like, 15 px left for a better investor "experience" *Disclaimer* I don't work at Bloomberg, just a company in the same industry as of this time

  • @pranjaldoorwar9743

    @pranjaldoorwar9743

    2 жыл бұрын

    @@FF18Cloud haha 😂

  • @microapple97

    @microapple97

    2 жыл бұрын

    😂😂😂

  • @akzarma
    @akzarma3 жыл бұрын

    **Code runs successfully** Him: cool Interviewer: cool. **leaves the meeting**

  • @tan-os2ed

    @tan-os2ed

    2 жыл бұрын

    Run your code and hit the road 🚴🚴

  • @kushal6065

    @kushal6065

    2 жыл бұрын

    cool

  • @andrewalarcon8640

    @andrewalarcon8640

    2 жыл бұрын

    cool

  • @Akira-sh7ts

    @Akira-sh7ts

    2 жыл бұрын

    cool

  • @konno_donnoi7851

    @konno_donnoi7851

    2 жыл бұрын

    cool

  • @Gotejjeken
    @Gotejjeken3 жыл бұрын

    As a software engineer, I swear the only time questions like these matter are in college. Maybe interview for top 5 percent of jobs, but the other 95 percent definitely not going this in depth. Companies need bodies not rainman.

  • @zenedge7599

    @zenedge7599

    3 жыл бұрын

    exactly, some my most fun jobs had no whiteboard interviews, just us devs talking shop, those are the real guys, this coding whiteboard shit has its place... in the classroom

  • @KraziAzian

    @KraziAzian

    3 жыл бұрын

    "Bodies not rainman" that is such a good line

  • @ssrodrigo29

    @ssrodrigo29

    3 жыл бұрын

    I already had technical interview like that and it never productive. It's impossible to keep calm. In a real work scenario, it's ok to research and you don't need to know everything from heart. The important is to know how to think to find the best solution but not resolve things like this and feeling embarrassed.

  • @ryankramer2217

    @ryankramer2217

    3 жыл бұрын

    I practiced these hard in college (because I had to for the classes). Never used it in a real interview.... ever!! Don't waste your time. Learn a framework like Spring, React, React Native, etc. and you are good.

  • @R1ka

    @R1ka

    3 жыл бұрын

    @Gotejjeken me too , the only time that i require someone to do this is the one i teached him it ( as an assistant professor) .

  • @geecee1990
    @geecee19903 жыл бұрын

    I've been a software engineer for 25 years. I have interviewed TONS of prospects. I've NEVER had them code without using a compiler. Typically, I would just come up with a project, give them the directions and let them sit in front of a computer for one hour and hammer it out the way they normally would. They get the compiler, internet, whatever they need. Now, given that, I do expect o see much better code than what would be written in notepad :) As long as they can then thoroughly explain their project to me I'm good with it.

  • @WyMustIGo

    @WyMustIGo

    2 жыл бұрын

    You must be inexperienced. There is a difference between being a progammer and a principal engineer, and also probably 100k a year more. Clearly you never made over six figures.

  • @geecee1990

    @geecee1990

    2 жыл бұрын

    @@WyMustIGo Oh give me a fucking break.

  • @geecee1990

    @geecee1990

    2 жыл бұрын

    @@WyMustIGo I have a senior position in a global company of 75000 employees and I make more than most CEOs in my town. I've interviewed probably hundreds of people in my 27 years in the business and I know what I'm talking about. And the bottom line is someone like you could never afford to hire a guy like me.

  • @LeTrollzGamer

    @LeTrollzGamer

    2 жыл бұрын

    @@WyMustIGo you scream narcissist energy

  • @LeTrollzGamer

    @LeTrollzGamer

    2 жыл бұрын

    @@WyMustIGo I'd rather be simple than an arrogant ass

  • @nomadsome
    @nomadsome3 жыл бұрын

    Engineers in this video: let's do some real algorithm work to get hired Founders of 95% products: I need to integrate Stripe with WordPress

  • @chriskerley1508

    @chriskerley1508

    3 жыл бұрын

    Binary trees do come up sometimes in development.

  • @grantmoore8790

    @grantmoore8790

    3 жыл бұрын

    @@chriskerley1508 no, they don't.

  • @chriskerley1508

    @chriskerley1508

    3 жыл бұрын

    @@grantmoore8790 Okay. Yeah your right. I revised my answer.

  • @challengecoins4u

    @challengecoins4u

    2 жыл бұрын

    LOL so true...

  • @eyesopen6110

    @eyesopen6110

    2 жыл бұрын

    @@chriskerley1508 Lol, No. they don't..

  • @xiongbenjamin
    @xiongbenjamin Жыл бұрын

    This interviewer giving a lot of guidance. I’d be grateful to have him. Other interviews don’t really do that

  • @DavidGreen34

    @DavidGreen34

    Жыл бұрын

    The interviewer was being super nice with hints. Most would just give you basic instructions, allow you to ask clarifying questions, and then go silent as you struggle through it.

  • @komerczka

    @komerczka

    Жыл бұрын

    Thats the point of this interview, not really coding the binary tree, but have something to work on together and see how the guy behaves under pressure.

  • @mr_cod3

    @mr_cod3

    Жыл бұрын

    He's from My country and i feel so proud hearing that

  • @elliotcounasse

    @elliotcounasse

    Жыл бұрын

    i just stumbled on this, and i’m confused how this is a interview, seems more like a lesson from a professor, however i’m very new to any of this so

  • @darthtrader7605

    @darthtrader7605

    Жыл бұрын

    @@elliotcounasse Apparently it is a peer to peer interview. Odd thing to call it, "interview". Seems more like an exercise in fundamental coding.

  • @jacquesduplessis8944
    @jacquesduplessis89443 жыл бұрын

    So I need a cheaufeur to drive me around: skills required are, mechanical engineering to build the limo each time I need a lift to the office.

  • @football12569

    @football12569

    2 жыл бұрын

    Underrated comment

  • @shockbilegaming8865

    @shockbilegaming8865

    2 жыл бұрын

    this is sooo underrated oh my god !!!

  • @djk80

    @djk80

    2 жыл бұрын

    I mean if the chauffeur was making hundreds of thousands of dollars per year. It would be nice if they could fix the car as soon as it breaks or continue to upgrade the car throughout the years rather than be having to buy a new one...... That would be worth it. Especially if he's driving me around to extremely important meetings where it would cost my company potentially millions of dollars if I was late or didn't make it

  • @kungfublob5951

    @kungfublob5951

    2 жыл бұрын

    @@djk80 "fix the car", Right, let me just get my wrench and pull out the engine then disassemble it, shouldn't be too long. It will be ready in 48 hours.

  • @TwinTurboOnly

    @TwinTurboOnly

    2 жыл бұрын

    @@kungfublob5951 Do you know what a mechanic is bro? Or a lift? or tools even?!

  • @fajar2742
    @fajar27423 жыл бұрын

    me : can i go to the bathroom sir ? i think i have diarrhoea . *comeback with the solution from stackoverflow

  • @yashpandey5070

    @yashpandey5070

    3 жыл бұрын

    Bro😂😂😂😂

  • @surgeif

    @surgeif

    3 жыл бұрын

    I would hire you immediately.

  • @xiaoyangliao6979

    @xiaoyangliao6979

    3 жыл бұрын

    Imagine another interviewer solve the problem without "going to the bathroom". Guess who gets the job.

  • @grandaddy0807

    @grandaddy0807

    3 жыл бұрын

    21:30 lol

  • @ankurrunthala

    @ankurrunthala

    2 жыл бұрын

    @@surgeif 😂

  • @Mrdresden
    @Mrdresden3 жыл бұрын

    10 years in the industry and I echo what others have said here. There is no particular reason to know how to solve this problem from memory. However being able to work through it is the real test here. If I were ever to sit over someone for a coding interview like this, I wouldn't really be looking for the correct solution, rather the approach and how long the individual stick with it.

  • @gepliprl8558

    @gepliprl8558

    Жыл бұрын

    I mean the majority of dev, programmer interviews is already like that. However, if someone else performs better (i.e. solve the problems much faster and efficient) than our chance to be accepted decreases significantly.

  • @otallono

    @otallono

    Жыл бұрын

    @@gepliprl8558 if they're only looking to hire one person

  • @gepliprl8558

    @gepliprl8558

    Жыл бұрын

    @@otallono yes that's one thing, another thing is that retaining devs are hard, things like stress, deadline, team disintegration, high demand, competition, etc. It's a big money industry but has it's own curse.

  • @nilfux

    @nilfux

    7 ай бұрын

    But not in 20 min in front of someone., That's not the same thing. It's bullshit.

  • @JustinK0

    @JustinK0

    4 ай бұрын

    this is the reasoning behind ALL math classes throughout ALL education, so many students are like "trig/algrebra is dumb, why do i even have to know this? ill never use it" it teaches you how to think logically and solve problems. that the entire point

  • @jedlechner3788
    @jedlechner3788 Жыл бұрын

    1. Read the question twice. Look at the examples. 2. Clarify the details of the definitions. In this case what is a "successor" 3. Clarify the constraints. 4. Determine edge cases 5. Choose an algorithm associated with the question. e.g. trees -> inorder, pre-order, post-order, bfs, dfs. 6. Implement the naive solution and discuss time and space. Write clean code. 7. If time talk about how you will improve the solution and implement if you can.

  • @ShadOBahn

    @ShadOBahn

    Жыл бұрын

    now do all that while mock managers are breathing down your neck asking you if the production fix is ready yet, devops is ready to deploy and SLA's are breached.

  • @LOLLOL-ff9sq

    @LOLLOL-ff9sq

    Жыл бұрын

    Ty

  • @khatdubell

    @khatdubell

    Жыл бұрын

    This advice doesn't always work. Interviewed with amazon once, asked the interviewer several pointed questions before i got started to make sure i 100% understood what he wanted. This was a 45 minute interview. With like 15 minutes left he asks me a question like "how are you going to handle x" I was like "i asked you about that at the start and you said Y, so i built my solution around that" I had all of 15 minutes to try and throw out everything i'd been thinking of for the last 30 minutes. recontextualize and resolve the problem and write it all down (this was a white board) _then_ he still wanted to ask me questions about my now fictional program. long story short, the interviewer boned me, big time. I aced _all_ the other interviews (amazon holds multiple interviews at once on a single day over the course of several hours), so it _had_ to have been this one guy.

  • @SmoothCoaxing

    @SmoothCoaxing

    Жыл бұрын

    @@khatdubell so what happened after bro you cant write a whole documentary then not finish it

  • @khatdubell

    @khatdubell

    Жыл бұрын

    @@SmoothCoaxing Nothing happened after. I didn't get the position. while i didn't enquire and further as to why they made their decision, i believe it was that one guy.

  • @danh3363
    @danh33633 жыл бұрын

    95% of devs will never need this. The real question is how well can the devs take requirements and create an effective solution.

  • @googavo1d

    @googavo1d

    3 жыл бұрын

    you mean like how well a dev can use 3rd party libs?

  • @cybienoa3530

    @cybienoa3530

    3 жыл бұрын

    They won't need it, but it's so easy that anyone but a junior should write it up in a few minutes after spending a few minutes to understand the question

  • @publicalias8172

    @publicalias8172

    Жыл бұрын

    @@cybienoa3530 Which google search class did you graduate from if I may ask?

  • @ooooiii8044

    @ooooiii8044

    Жыл бұрын

    ​@@googavo1d Abstractions exist everywhere, with that logic we may say that you have code linux from scratch before you're a true dev

  • @tensor5113

    @tensor5113

    Жыл бұрын

    @@googavo1d The biggest idiot in the world, is one who recreates everything from scratch

  • @rajatmishra6628
    @rajatmishra66283 жыл бұрын

    If i get an interviewer this friendly, I'm going to crack Google.

  • @xfrostbite8328

    @xfrostbite8328

    3 жыл бұрын

    😹😹

  • @Jagadish12345

    @Jagadish12345

    3 жыл бұрын

    😂😂👍🏻

  • @tylersmith2634

    @tylersmith2634

    3 жыл бұрын

    Lol finally someone who said it! This is an extremely simple problem for anyone who's taken an algorithms class and the dude held his hand the whole way through it. Shouldn't have taken more than 10 min to be done with the problem.

  • @FF18Cloud

    @FF18Cloud

    2 жыл бұрын

    Ugh, I hate it when during the interviews the interviewer tells you to literally shut up and just do the problem -_- Like, the people interviewing you are people you will be working with on the team, their impressions on you are just as important in whether you want to work with these people basically throwing you off on an island and getting annoyed at you

  • @RaushanKumar-vg2tn

    @RaushanKumar-vg2tn

    2 жыл бұрын

    Rajat Mishra I Need A Software Engineer please Reply Sir

  • @JimzZel
    @JimzZel Жыл бұрын

    My biggest advice for interviews like this "communication is key".. speak with the guy who is interviewing you say what you think. It gives the guy an idea on how you think. Most of the time it is not about the technical knowledge itself but how you handle it.

  • @JimzZel

    @JimzZel

    Жыл бұрын

    @@shalimkhan2023 can happen.. Then you fire them.

  • @JimzZel

    @JimzZel

    Жыл бұрын

    @@shalimkhan2023 my personal opinion about this, most of the time you don't want to work for them.. 😅

  • @user26912

    @user26912

    Жыл бұрын

    Or woman

  • @JimzZel

    @JimzZel

    Жыл бұрын

    @Hooch Smeeth you will not be the one sitting on the other side of the table. Never been fired.

  • @Tiredgeek

    @Tiredgeek

    Жыл бұрын

    Be easier if the guy spoke plain English.

  • @itsukiuehara6292
    @itsukiuehara62923 жыл бұрын

    maybe he is hiring for a "binary tree interviewer position" that is why they are discussing binary trees.

  • @RadojeFrom
    @RadojeFrom3 жыл бұрын

    What I learned from this video "Oh yeah, yeah, cool. Okay, yeah, yeah cool. Okay"

  • @rylordrylord7347

    @rylordrylord7347

    3 жыл бұрын

    Lol

  • @skacademy..dailyquiz2704

    @skacademy..dailyquiz2704

    3 жыл бұрын

    😂😂😂😂🤣🤣🤣me tooo

  • @soruzein2988

    @soruzein2988

    3 жыл бұрын

    "Exactly"

  • @googavo1d

    @googavo1d

    3 жыл бұрын

    the binary language!

  • @gulshanbakle1157

    @gulshanbakle1157

    3 жыл бұрын

    I learned about 10 new ads!

  • @tuananh284220
    @tuananh2842203 жыл бұрын

    Nice zoom meeting of 2 guys trying to complete final project before Thanksgivings!

  • @JRoblesCares

    @JRoblesCares

    3 жыл бұрын

    hahahahahaha!!

  • @ikeo8666
    @ikeo86662 жыл бұрын

    this is one of those interviews where you can get the interviewer to give you the answers because it makes them feel smart. so easy

  • @northpolenate
    @northpolenate7 ай бұрын

    this is really helpful, it's cool that you recorded this and posted so i know what i will be facing when i advance my coding skills to look for another job

  • @michaelnaylor8245
    @michaelnaylor82453 жыл бұрын

    It seems like they’re interviewing each other. I think it was more of a collaborative problem solving exercise

  • @aminsehla3814

    @aminsehla3814

    15 күн бұрын

    and that's great way to find solution in corporation, so why not

  • @AdityaSingh-cv9nl
    @AdityaSingh-cv9nl3 жыл бұрын

    Who is here after Hated Tarun description It's me

  • @ly_lols

    @ly_lols

    3 жыл бұрын

    Yeah me

  • @maybeimdulu

    @maybeimdulu

    3 жыл бұрын

    Me me!!!

  • @ishir1495

    @ishir1495

    3 жыл бұрын

    me

  • @darshkatiyar7d74

    @darshkatiyar7d74

    3 жыл бұрын

    Me

  • @kiNGkiNG-bu6dm

    @kiNGkiNG-bu6dm

    3 жыл бұрын

    H bhi

  • @tommallama9663
    @tommallama96633 жыл бұрын

    Thanks for showing this. I have had a few interviews, including one with Amazon (why they wanted me is beyond me..) and I felt so stupid trying to come up with a solution. Seeing that it's just par for the course really makes me feel relieved (and inspired quite frankly). I really appreciate you and your channel. All the best man.

  • @joshuamaltez4704

    @joshuamaltez4704

    Жыл бұрын

    Howd it go?

  • @tommallama9663

    @tommallama9663

    Жыл бұрын

    @@joshuamaltez4704 with Amazon, not well. They are strictly interested in people who live and die by O(n) and nothing else, but I was able to secure my dream job with a game company so in the end, it worked out! Thanks again for the insight!

  • @bb-xj9ed

    @bb-xj9ed

    6 ай бұрын

    can you help a brother out, been trying to find a job@@tommallama9663

  • @imfrommars7362

    @imfrommars7362

    Ай бұрын

    @@tommallama9663 yo dude how's everything going now?

  • @tommallama9663

    @tommallama9663

    Ай бұрын

    @@imfrommars7362 I learned being a software engineer wasn't for me, but I took what I learned and ended up being a Technical Producer instead! So it goes to show that these skills are valuable and you never know where you'll land!

  • @vladandrei51
    @vladandrei513 жыл бұрын

    These kinds of cliche questions are never ever used in real-life situations. You can literally learn by heart those types of things and pass any interview with breeze but have no idea what you're doing otherwise.

  • @randomperson3730

    @randomperson3730

    3 жыл бұрын

    You really can BY-HEART ALL these questions? You can't. You HAVE to come up with solutions on the spot eventually. They even ask you follow up questions if they get the hint that you've memorized this solution. And you can only come up with solutions on the spot if you have good problem solving skills. And you can only have good problem solving skills in such questions after practicing them. Saying that "people can just BY-HEART these questions and pass any interview after a week's preparations" is like saying "people can just BY-HEART all the syntax of javascript and remember all the working of whole MERN stack and pass the interview after a week's practice only". The point being, both approaches work. People get job by doing dsa only, people get jobs without doing dsa at all also. So go for the one which you think is right for you. Another thing I'd like to mention here is that, recruitors prefer dsa questions bcz with these, they can judge you, with numbers. It's tangible how many dsa problems someone solved. But it's not tangible how good of a project someone made. To judge a project, interviewers have to spend a lot of time. And remember that the recruitors that do use dsa questions, don't just use dsa questions. There is usually also a system's design question and computer theory questions. Do not forget the behavioral questions as well

  • @konradzdanowicz5010

    @konradzdanowicz5010

    3 жыл бұрын

    Yes and no. While these aren't real-life problems, you still need to be efficient in sorting out the solution to an unknown problem in real life. Hence, writing BST is a waste of time as you can memo it (agree), while this one is a good example of a problem that you have to wrap your head around and come up with a solution quickly enough, or at least be able to jam with the recruiter to show of your coop skills. This is a good indication of how the candidate will tackle any potential problem.

  • @ITsecurityEng

    @ITsecurityEng

    3 жыл бұрын

    @@randomperson3730 I am Azure dev and I make flan for my guests. This is slick Italian desert. Think like Monaco.

  • @randomperson3730

    @randomperson3730

    3 жыл бұрын

    @@ITsecurityEng i googled it and it looks nothing like a Monaco

  • @AtriTripathi
    @AtriTripathi3 жыл бұрын

    Please do and upload more of these kinds of videos. These live interviews really help. Thanks a lot!

  • @JM-gz1ej
    @JM-gz1ej3 жыл бұрын

    Majority of software engineers never work on these nonsense in day to day work

  • @justinskidmore9677

    @justinskidmore9677

    3 жыл бұрын

    hear hear

  • @athegreat88

    @athegreat88

    3 жыл бұрын

    I've always wondered if the real job is similar to these online interview or practice problems. Have you worked as SE before? What types of work do you do on your day to day job? Really Curious to know...

  • @humann5682

    @humann5682

    3 жыл бұрын

    @@athegreat88 The problems and type of interviews on YT are not too far away from what you get asked. The problem is, as the OP says, you are asked to answer problems that are in no way reflective of the actual work you do. Once I pass the technical interview, I always ask the company "Can you tell me on what projects does the company use the algorithms or solutions asked for in the technical interview"? No single question you can ask in a tech interview will make the interviewers squirm as much lol. They know they have just asked you to demonstrate knowledge that is unrelated to the role.

  • @athegreat88

    @athegreat88

    3 жыл бұрын

    Hu Mann 3 more years and i guess i’ll see what cs majors actually work on. If u guys don’t use arrays or data structures in an actual job then i wonder what the “Actual” job or work really is. Really curious to know. What part or section of what we learn in our CS course do we mostly use for jobs?

  • @michealnd969

    @michealnd969

    3 жыл бұрын

    If only demostrate how you think to solve Problems. Its not all about building things, but analyzing and solving problems. Critical thinking, logic, algorithm. Syntaxes changes but logic is always the same.

  • @dave4347
    @dave43472 жыл бұрын

    I’ve had a very successful career as an engineer working on some very cool projects. To the prospective and newer developers out there-when I see companies interviewing like this I run. If this is your jam then cool, but it’s never been my thing. Please don’t buy into the notion that coding challenges are required in the interview process to have a successful career as a developer.

  • @Ybby999

    @Ybby999

    2 жыл бұрын

    Thank you! It's been a while since my datastructures & algorithms class and I really dislike the idea of coding challenges.

  • @antwanwimberly1729

    @antwanwimberly1729

    2 жыл бұрын

    @@Ybby999 same - it sucks!

  • @indra_vrtrahan

    @indra_vrtrahan

    2 жыл бұрын

    @@Ybby999 Be real man, who has EVER liked them, unless you had like whole time in the world, and it was simply among friends in college, that is different, actuall challenges are pretty cancer, that is blunt honestly.

  • @Another0neTime

    @Another0neTime

    2 жыл бұрын

    I think it has some merit. My company hired an SDET that didn't know OOP principles. They tried not doing a coding interview. 4 years later, they still don't know OOP and still stuck in the same position. They have even had mentoring.

  • @the1anonymouse

    @the1anonymouse

    Жыл бұрын

    @@Another0neTime Coding challenges and coding interviews don't go over OOP principles

  • @bran_rx
    @bran_rx3 жыл бұрын

    I was hoping this kinda video would make me hate my life but naa, I'm ready for that interview... fun to watch, putting this on my programming challenges list

  • @Asiagosik
    @Asiagosik3 жыл бұрын

    During Bloomberg technical rounds, the person being interviewed isn't usually asked to compile the code

  • @nathansire6623

    @nathansire6623

    2 жыл бұрын

    Bloomberg did mine in a Google Doc. I aced it. Then he said I did not know what I was doing.

  • @user-mr3cj2zk6k

    @user-mr3cj2zk6k

    2 жыл бұрын

    @ThePrivateJoker Because talking is cheap, show me the code.

  • @user-mr3cj2zk6k

    @user-mr3cj2zk6k

    2 жыл бұрын

    @ThePrivateJoker It's a trade off. No one can develop an application in 30 minutes or so.

  • @user-mr3cj2zk6k

    @user-mr3cj2zk6k

    2 жыл бұрын

    @ThePrivateJoker There're separate parts for experience and behaviral questions. But trust me, I'll be able to bullshit and cheat the interviewer like a boy if I want. But cheating on "puzzles" part is way more difficult.

  • @user-mr3cj2zk6k

    @user-mr3cj2zk6k

    2 жыл бұрын

    Where is the great Joker?

  • @xinli8194
    @xinli81943 жыл бұрын

    For this question, it’s actually looking for the next node in the middle order traversal. So just need to continue the middle order traversal from the input node for one step. If the node has right tree, get the left most node of it. Then if the node has parent, go to it, and check if the node is the left or right child, if it’s the left one, return the parent, otherwise go to the parent and check recursively.

  • @erazlle
    @erazlle2 жыл бұрын

    I'm not a coder and have obsoletely no idea what's happening but I'm enjoying these magic words.

  • @smomingi

    @smomingi

    2 жыл бұрын

    lmao same I have literally no idea what's happening

  • @shivamrajawat3322
    @shivamrajawat33223 жыл бұрын

    Man I just subscribed. This was awesome. I learned a lot

  • @nothingiseverperfect
    @nothingiseverperfect4 жыл бұрын

    OH WAIT. YOU GUYS ARE INTERVIEWING EACHOTHER

  • @stealthattack2209

    @stealthattack2209

    3 жыл бұрын

    LOL

  • @dreamhere8306

    @dreamhere8306

    3 жыл бұрын

    No that Indian is interviewing the foreigners

  • @keshavnathoo1218
    @keshavnathoo12183 жыл бұрын

    From all coding interview videos i've seen, the companies really i mean REALLY like binary trees questions

  • @artymar1537

    @artymar1537

    3 жыл бұрын

    I know, majority of the questions are either sorting or search.

  • @Casprizzle
    @Casprizzle3 жыл бұрын

    I swear these tests were designed by HR who have no idea what dev is actually like.

  • @jloiterer
    @jloiterer Жыл бұрын

    This is great. Sometimes even in these technical interviews the interviewer is looking for someone who THINKS - not someone who knows all the answers. Techinically speaking someone who already saw this same problem could write the code in 5 minutes, get the answer right, and the interviewer still knows nothing about them. They don't hire people that just remember a bunch of crap - the job requires thinking. The job involves being wrong sometimes and responding to being told you are wrong and how you respond when you're right and others are wrong. The tech leads what thinking, respectful, and civil people are on their teams.

  • @nikhilraov100
    @nikhilraov1003 жыл бұрын

    Nice teamwork and problem solving skills on display by both of them . Kudos to both of you

  • @IsmaelPoteau
    @IsmaelPoteau3 жыл бұрын

    The problem with these interviews is equating that how fast you come up with the solution to the problem to how well you understand data structures and algorithms.

  • @MiloDC

    @MiloDC

    2 жыл бұрын

    Fast and clever is all these college boys appreciate.

  • @leetkhan
    @leetkhan3 жыл бұрын

    We may not have written binary search in our software developer journey but the external libraries we use day to day they use these kind of algorithms. It’ll useful when you’re authoring a library.

  • @ChrisM541

    @ChrisM541

    8 ай бұрын

    Do you think libraries have gotten to the point where the requirement to actually...program is being eroded?

  • @francksgenlecroyant
    @francksgenlecroyant3 жыл бұрын

    Everybody is just saying that tech company will only ask you to do some complex CRUD operations and not this one we are seeing, haha. Don't forget that we learn such stuffs for the sake of improving our way of thinking and very soon you will be implementing this in real world projects knowing already and understanding what you are doing and why you are doing it! Thanks! Learn Data Structures and Algorithms, you will never regret doing so! Thanks for this great content and I wish you a very Happy Coding in this very Happy New Year!

  • @zHqqrdz
    @zHqqrdz3 жыл бұрын

    10 years of development, code is a passion for me. I had to use a binary search once in my whole career, went to Google and copied the algorithm. Your role as a programmer should not be to be able to recreate already found algorithms. Rather it should be to know when why and how to use them. Maybe show a real-world example, and ask the interviewee how he'd design it from a macro perspective, then help him jump some steps, show a very slow implementation and ask him how this could be optimized (using which algorithm for example), what are the caveats, etc. Now you have someone solving a problem, maybe interested in solving this problem, and he doesn't have to be a talking Wikipedia page working on a problem which he'll never encounter in his day-to-day job.

  • @samiriraqui750

    @samiriraqui750

    3 жыл бұрын

    I've had it once i got into an internship, to parse a tree (N-ary tree) lol, guess i'm not that lucky. the worst thing to start a career with

  • @velvetypotato711

    @velvetypotato711

    3 жыл бұрын

    I memorized it. The EPI book said that 90% of programmers couldn't code it from memory. So I memorized it.

  • @montgomeryfrenwheringwerth5584

    @montgomeryfrenwheringwerth5584

    2 жыл бұрын

    They aren't testing your ability to write an algorithm. They are testing your ability to break a coding problem down into steps and solving it.

  • @ttt69420

    @ttt69420

    2 жыл бұрын

    @@montgomeryfrenwheringwerth5584 Uh, that's what an algorithm is.

  • @montgomeryfrenwheringwerth5584

    @montgomeryfrenwheringwerth5584

    2 жыл бұрын

    @@ttt69420 Yes, but the algorithm is not what matters. You don't necessarily have to get the algorithm working in the interview. They want to see if you are approaching it correctly. If you memorized how to write the algorithm you were asked to write, it would be quite obvious to the interviewer and it would not impress them.

  • @heribertoroman7860
    @heribertoroman78603 жыл бұрын

    This was great thank you! I really need to do more mock interviews after seeing this.

  • @kartikchauhan1327
    @kartikchauhan13273 жыл бұрын

    Interviewer is very helpful and wants the candidate to come up with the right solution using his own 🧠. That's good to see.

  • @dingdong3335
    @dingdong33353 жыл бұрын

    I'm good at data structure when I'm in college but now I've already forgotten most of them. Never use any of them since I started working and maybe never ever will.

  • @tridipbaksi2434
    @tridipbaksi24343 жыл бұрын

    Anyone after watching hated tarun hit like..

  • @StardustsCockaigne1111

    @StardustsCockaigne1111

    3 жыл бұрын

    Haha me!

  • @omjadhav8046

    @omjadhav8046

    3 жыл бұрын

    Yes

  • @slouchysenpai1970

    @slouchysenpai1970

    3 жыл бұрын

    Me loo

  • @pritam9873

    @pritam9873

    3 жыл бұрын

    Yep bro

  • @laxapathinaik6161

    @laxapathinaik6161

    3 жыл бұрын

    Bro i didn't understand anything can anyone please explain

  • @DanielGuzman31
    @DanielGuzman313 жыл бұрын

    This feels more like tutoring than a programming interview ahaha, I wish all interviews were like that!

  • @The_Esav

    @The_Esav

    Жыл бұрын

    I think it’s an important part of working with someone. It’s a good way to see if someone is coachable because at some point someone will not know everything

  • @samjohns8381

    @samjohns8381

    Жыл бұрын

    Yep, this is exactly as interviews should be. You learn a lot more helping someone with a problem than seeing what they can remember off the cuff in a stressful situation.

  • @zhexunchen4539
    @zhexunchen45393 жыл бұрын

    i'd say it's really a good way to prepare for an interview. definitely would try it later after

  • @dormancygreedy
    @dormancygreedy3 жыл бұрын

    One way I think is to insert into a stack every element greater than the search input, until the right child element of the search input is reached after an inorder traversal. Then the first element popped from the stack is the immediate next successor of the search input.

  • @ImEmix
    @ImEmix3 жыл бұрын

    pretty much giving you the answer the whole way through the interview.

  • @anubhavsingh9848
    @anubhavsingh98483 жыл бұрын

    They actually missed one case: If the input node was 20, and there was no 25, it would go to the second case and store the parent node as null and child node as 20 i.e., the input node. Then in the while loop, the code will check for null.right, which will throw an exception. So they need to check if in the second case, the parent node is null, return the child node, i.e., the input node.

  • @camtugueder

    @camtugueder

    3 жыл бұрын

    Exactly, it looked like the interviewer was going to catch it but no, they didn't look at the very first edge case.

  • @dapperpanguin994

    @dapperpanguin994

    2 жыл бұрын

    Node findSuccessor(Node inputNode) { if (inputNode.right != null) { Node next = inputNode.right; while (next.left != null) { next = next.left; } return next; } if (inputNode.parent != null) { //true if (inputNode.parent.left == inputNode) { //false return inputNode.parent } Node prev = inputNode.parent; while (prev.parent != null) { if (prev.parent.left == prev) { return prev.parent; } prev = prev.parent; } } return null; } This was my solution to it. Are there any problems?

  • @ruhan23

    @ruhan23

    Жыл бұрын

    spot on, I thought the same

  • @benjamindickerson9372

    @benjamindickerson9372

    Жыл бұрын

    So you’d have to make sure the input node has a right child and a parent node, right?

  • @anuraganand6053

    @anuraganand6053

    Жыл бұрын

    Precisely

  • @minerbob4334
    @minerbob43343 жыл бұрын

    Just perform a search on the node using recursion and then if the right child doesn't exist, go back to each of the parent nodes and find which of the parent nodes has a value greater than the node you're looking for.

  • @MrBlackspoon

    @MrBlackspoon

    2 жыл бұрын

    Exactly recursion is key

  • @publicalias8172

    @publicalias8172

    Жыл бұрын

    @@MrBlackspoon No YOU'RE the key and might I add, Breathtaking!

  • @jkaryskycoo

    @jkaryskycoo

    Жыл бұрын

    I don't see how they're even approaching it without initially talking about recursion. These interview videos always seem to miss the correct solutions.

  • @rishdhoni319

    @rishdhoni319

    Жыл бұрын

    @@publicalias8172 YOU'RE ALL THE KEY AND BREATHTAKING

  • @christianonwe2045
    @christianonwe20452 жыл бұрын

    This is pretty straight-forward to go through with time-complexity of O(n) and O(n) space complexity

  • @abhibrotomukherjee8239
    @abhibrotomukherjee82393 жыл бұрын

    I hate interviewers who are so hand-on, let the person explain their process to come to an answer. I feel like they tunnel my vision towards the solution. I like interviewers who just provide a hint when I am stuck and quite for a few mins or even ask me if I'd like to get a hint on my path.

  • @zHqqrdz

    @zHqqrdz

    3 жыл бұрын

    As an interviewer, it's quite hard to keep a decent pace without giving too much information and respect the timing that management gives you to conduct the interview at the same time. I'll keep this advice to "ask if the interviewee would like a hint". Thanks.

  • @IsaacC20
    @IsaacC20 Жыл бұрын

    Traverse the tree in-order. When visiting a node, check if it's the inputNode. If so, set a "nodeFound" flag and continue traversing. Having found the inputNode, at the beginning of the next recursive call, check if nodeFound flag is set (which it should be) and if so, set nodeFound to false and return the current node (which would be inputNode's successor).

  • @joesoultanis3724

    @joesoultanis3724

    7 ай бұрын

    This is a good solution but it is O(n) where n is the number of nodes, and it ignores that the structure given is a BST tree, which if balanced, lets us find the target node in O(logn).

  • @TonyDiCroce
    @TonyDiCroce2 жыл бұрын

    When I interviewed at Bloomberg I happened to have implemented a binary tree on the flight to New Jersey... so it was fresh in my head and I answered it easily.

  • @MachiriReviews
    @MachiriReviews Жыл бұрын

    I finally get it. The best way to use a Binary Search Tree is to interview people. Truly an amazing data structure.

  • @blacksaibot6158
    @blacksaibot61583 жыл бұрын

    Seen a lot of comments about SWENGs never having to do this in their career. I agree, because as coders we DON'T REINVENT THE WHEEL! This is something you ask interns to see how much they've been paying attention to their classwork in undergrad or maybe graduate school.

  • @msabyss_3998

    @msabyss_3998

    Жыл бұрын

    Yeah but WHY ?

  • @blacksaibot6158

    @blacksaibot6158

    Жыл бұрын

    @@msabyss_3998 Why WHAT? What point are you not understanding?

  • @msabyss_3998

    @msabyss_3998

    Жыл бұрын

    @@blacksaibot6158 Why would HR ask to see how much I've been paying attention in school ? even if I was an A student, Why is it so important for you guys that I was paying attention ? Whats Academia have to do with all of this ?

  • @msabyss_3998

    @msabyss_3998

    Жыл бұрын

    @@blacksaibot6158 What value does asking people to solve impossible tasks can add to the work environement ? bcs to me it seems that HR nowadays dont really know How to hire talents and instead they keep hiring A students who clearly lack experience

  • @benpurcell591
    @benpurcell5912 жыл бұрын

    10 years ago, straight fresh from uni I had recently studied BST's and would answer this quickly. 10 years later, I'm generally a better software engineer, by far, but I would have stumbled through this as I've never needed this knowledge day to day. At least for the first 10 minutes while I got my bearings. These kind of questions are daft, I am guessing they came about because people who started Google/early recruits were academics/students fresh from college/uni and it's what they knew. Now these questions are standard as everyone wants to be like Google...

  • @OmarOmar-eo3pw
    @OmarOmar-eo3pw Жыл бұрын

    I have never had that helpful of an interviewer.

  • @EmadMokhtar
    @EmadMokhtar Жыл бұрын

    This software engineer isa very nice interviewer. It felt like a pair programming than an interview. Well done.

  • @SpencerFcp
    @SpencerFcp3 жыл бұрын

    If a job is asking you about binary trees in an interview, it's a pretty huge red flag. Surefire sign that working for that company is going to suck. It actually was the deciding factor in my last job. One interview was JUST like this followed up by an in person whiteboard. I got lucky and the question asked was almost completely identical to a question that was asked to me at a previous interview. I eventually got an offer, but it felt like such a cold uninviting performance evaluation that I decided to go with a different offer despite it being around 5k shorter in salary. Give a take home test, asks some general debugging questions, ask general questions about the language and frameworks they are familiar with, intentionally break some code and have them fix it, have them write some generic sql. I've been engineering for 10 years and have never had this come up even once.

  • @darkwoodmovies

    @darkwoodmovies

    3 жыл бұрын

    i think it's mostly meant to weed out people who can't do these problems (and in turn, should not be behind an IDE coding anything), which is surprisingly a lot of people. It only becomes a problem if the questions are stupidly complicated or the whole interview loop is just coding interviews. But like, they have to verify that you can actually code, don't they?

  • @Savukala

    @Savukala

    Жыл бұрын

    They want to see how you approach a really difficult problem, do you freeze under the pressure of not fully understanding what you are asked to do, or are you gonna try and work it out with or without the interviewer anyway. It is not necessarily a red flag.

  • @realchrishawkes
    @realchrishawkes3 жыл бұрын

    Good video!

  • @LeoTM

    @LeoTM

    2 жыл бұрын

    amen

  • @gianlucamb9
    @gianlucamb9 Жыл бұрын

    As a self-taught and still in the early stages of becoming a decent Software Engineer, I am realizing that these problems are actually very logic-based. If you can understand the problem and break it down into simpler problems, you already have 60% of it solved. Figuring out the logic to solve each part is another 30%. The coding part is just 10% and it is the easy part since you are just translating the answer that you already have into code. Please let me know if I'm wrong about this.

  • @le_deer

    @le_deer

    9 ай бұрын

    There are questions where the "understand part" is rather easy, but the implementation with all corners cases is tough. Search for "Median of two sorted arrays" or "Text Justification"

  • @nandohosp312

    @nandohosp312

    7 ай бұрын

    yes you are wrong

  • @april7636

    @april7636

    7 ай бұрын

    can you explain then@@nandohosp312

  • @liquidmetal718

    @liquidmetal718

    6 ай бұрын

    Yes , you are wrong. It simply means you've solved only easy problems or adhoc ones.

  • @ajayChauhan-nt5xm
    @ajayChauhan-nt5xm2 жыл бұрын

    Been a game developer for 8 years, never asked any candidate these questions, always walked out straight away from interviews when i got asked these questions, never implemented them in my life for once or felt the requirement. Although good information and style and attitude of interviewer.

  • @Andy-wv2xj
    @Andy-wv2xj3 жыл бұрын

    The idea he said about change the getMostLeft from recursive approach to a iteration approach is nice but why the interviewer talking about a irrelevant problem? the candidate doesnt even gonna add any pointer which point to its most left node to every single node of the tree. And this definately avoid expanding call stack

  • @ari.h.ant.

    @ari.h.ant.

    3 жыл бұрын

    yeah the interviewer thought that he is trying to change the structure of the tree.

  • @TimothyBrake
    @TimothyBrake3 жыл бұрын

    It’s an academic question and tests the problem solving skills but in professional development this is highly unlikely you will need to implement a binary search and find the next in order. If someone is writing it in your team, slap him and tell the developer there are libraries for that and most likely there is something wrong with the use case the developer is implementing from a business perspective. If the business is writing a framework better than existing frameworks then... good luck 😀

  • @szkoclaw

    @szkoclaw

    Жыл бұрын

    This is an intelligence test, not a knowledge test. Intelligence tests are otherwise illegal in recruitment.

  • @saravanakumaranmanickam7547
    @saravanakumaranmanickam7547 Жыл бұрын

    @Keep On Coding I think the code does give you exception when the input node is 20 and assume there is no node 25. Because It will fall into the second case and when it goes through the parent=inputNode.parent(null).It will give you exception when it goes on line 48 which is **while loop condition**. There we need to add one more condition which is to check whether the parent node is null or not. *Please comment on this explanation if i'm wrong*.

  • @alvintan2995
    @alvintan2995 Жыл бұрын

    Really enjoyable looking at this video!

  • @SuddenHamster
    @SuddenHamster3 жыл бұрын

    It's a big luck to meet a helpful interviewer like this guy. He was guiding you in the correct direction all the way. In my experience interviewers tend to be way less chatty and the only thing that you can hear from them is the keyboard clicking while they are taking notes on what you doing and saying.

  • @luistellez12

    @luistellez12

    3 жыл бұрын

    Just so you know, if you are in an interview and they keep pointing to you in the right direction you failed your interview already and they are trying to get rid of you but leaving you the smile. Its ok to help a little and give some hints but fixing your code and letting you know how its done it its a bad interview.

  • @dw4525

    @dw4525

    3 жыл бұрын

    They’re probably chatting to coworkers on Slack, not taking notes.

  • @TheGhost094
    @TheGhost0943 жыл бұрын

    Yet to meet a developer who actually used a Binary tree in his work

  • @iAdrianT

    @iAdrianT

    3 жыл бұрын

    The interviewer!

  • @juangoria3517
    @juangoria35173 жыл бұрын

    Unless you're writing really complex solutions and i mean backend, optimization, you dont really need to know this... I think searching for solutions online its a required skill for any programmer

  • @ediponascimento532
    @ediponascimento5323 жыл бұрын

    I liked it. They worked as a team. I think they enjoyed it already.

  • @BENGALReaction
    @BENGALReaction3 жыл бұрын

    Logic is right, but the coding will give problem. Good way of showcasing an interview, mostly a discussion of a problem

  • @berkantasci8811
    @berkantasci88112 жыл бұрын

    Recently in an interview I was asked a similar question. Mine was a bit more complicated and I wasnt allowed to use any sources. The thing is I am a new graduate so I kind of messed it up and didnt get hired. I know it isnt the best way to evaluate my worth as a software engineer but still sucks to not get the job.

  • @BenDover-fv5sb

    @BenDover-fv5sb

    Жыл бұрын

    Just mass apply bro. Any opportunity you see just go after it and grind grind leet code. Rn it’s rlly hard to get a job as a new grad but it’s up to your own will!

  • @ilikememes9052
    @ilikememes9052 Жыл бұрын

    The problem itself screaming to apply a inorder traversal on BST. As a fact, Inorder traversal of BST is always a sorted list of nodes so you just need to return the first node whose value is greater than input node. So next time use this fact. PS - I am just a student preparing for interviews

  • @brianmcmillan8143

    @brianmcmillan8143

    Жыл бұрын

    I thought the same thing at first but the time complexity on that solution will be O(n) since you have to traverse the entire tree. I’m not finished with the video yet but the solution of the video seems to cut down the iterations a lot by traversing based on a logic system

  • @ilikememes9052

    @ilikememes9052

    Жыл бұрын

    @@brianmcmillan8143 worst case time complexity will be always O(n) But yeah operation can be further cut down

  • @brianmcmillan8143

    @brianmcmillan8143

    Жыл бұрын

    @@ilikememes9052 yup !

  • @cinematicsl
    @cinematicsl Жыл бұрын

    I wish I had interviewers like him, so he can write half of my code. My interviewer would just sit idle and wait for my code to pass all test cases then he would simply say "Nah! You should have arrived at the solution much faster."

  • @shaikzuhair8537
    @shaikzuhair85373 жыл бұрын

    Thanks for u uploading the video..

  • @nothingiseverperfect
    @nothingiseverperfect4 жыл бұрын

    OH YOU’RE THE ONE INTERVIEWING LMAO

  • @wnmcaapital11

    @wnmcaapital11

    3 жыл бұрын

    Wondering whos interviewing who. Lol

  • @MoinKhan-fc4wh

    @MoinKhan-fc4wh

    3 жыл бұрын

    @@wnmcaapital11 glasses is the interviewer

  • @Declan_dice

    @Declan_dice

    3 жыл бұрын

    @@MoinKhan-fc4wh oooh damn it was hard to tell who is who

  • @Mr_Nobody640

    @Mr_Nobody640

    3 жыл бұрын

    Same confusion 🤣

  • @andrewpulle315

    @andrewpulle315

    3 жыл бұрын

    If you look at the top it says it's his partners turn, the site lets 2 people perform mock interviews on eachother

  • @rahulbhandari3558
    @rahulbhandari35583 жыл бұрын

    His interviewer gave him time to open the door , mine didn't even repeat the question 😭

  • @pataka81
    @pataka813 жыл бұрын

    so the answer would be... "so you wanna be a software engineer at google ??" damn clement's ad

  • @user-eo5bh2zg2f
    @user-eo5bh2zg2f4 жыл бұрын

    I feel like for this specific question, 2 while loops would do the trick pretty well

  • @MrFTW1001

    @MrFTW1001

    2 жыл бұрын

    I’m just wondering couldn’t have u done a regular inorder traversal and return the first number that is bigger than the input node.

  • @revanthsai7894
    @revanthsai78944 жыл бұрын

    Two cases here Case 1 - When right subtree of the node is not null. In this case the successor is the minimum value in the right subtree. Case 2. When the right subtree is null. Traverse from the root to the node. First time we go left in this traversal is the predecessor node.

  • @joseocampo7561

    @joseocampo7561

    3 жыл бұрын

    That was what I thought too!

  • @ImTheBoss914

    @ImTheBoss914

    3 жыл бұрын

    In the case of finding, Node14 in order’s successor, your case 2 would return 9 ?

  • @JW-ku7nn
    @JW-ku7nn Жыл бұрын

    The pure excitement at the end. "Its working now, cool... cool"

  • @Akaash449
    @Akaash4492 жыл бұрын

    While you're going left downwards, keep a variable successor pointed to prev node. So when you would need to go downward right do not change the value of successor until you find the node. Once you do find that check if that node has a right node or not or if it has whether its value is less than that of 'successor'. If yes then assign 'successor' to the right node, if no then 'successor' is already assigned to the correct node, no need to update it. Return successor. Problem solved. (Obviously check for NULL is done at each step and if NULL is encountered before reaching node -1 is returned).

  • @thomasmartin6623
    @thomasmartin66233 жыл бұрын

    Guys these questions aren't because this is what you're going to work on on a daily basis, it's to give the interviewer a sense of your ability to problem solve. Nobody is going to ask you to write an algorithm everyday, but if you can reasonably solve it and talk your way through it it shows that you have at least a foundational understanding of the concepts involved and also that you can adapt to solve a potentially odd/tricky problem during a stressful time (the interview). It lets the person know that if they put you on an assignment you're more than likely going to solve it in a reasonably well thought out way and that you understand the potential upside to space/time optimization when it matters. It also shows your communication skills to some extent too so it's good to have a positive approachable attitude while working through it.

  • @thomasmartin6623

    @thomasmartin6623

    3 жыл бұрын

    @Benjamin You can absolutely get better and improve. Very few people are just born so smart that they require very little practice. Hard work beats out raw intelligence many times and once you code for long enough you start seeing patterns and learning various ways to think about things. Most people spend time practicing these type of interview problems so they arent totally thrown off when they are asked to use some data structure to solve a problem. If you remain dedicated you will succeed. Never let the fact someone else may know it better dissuade you from trying at all. Keep practicing and asking questions. If you want to get good at cooking, you must cook often and with the mindset that you're looking to improve. Same goes for coding or problem solving.

  • @ttt69420

    @ttt69420

    2 жыл бұрын

    @Benjamin At some point IQ will determine the highest level of abstracted complexity you can deal with. Luckily hardly anything in CS is all that complex. That's why there's hundreds of millions of people who can do it.

  • @prodxyn
    @prodxyn3 жыл бұрын

    randomly clicked on this video and I finished watching this video with 3.5 braincells remaining.

  • @emzyempire658
    @emzyempire658 Жыл бұрын

    What i could think about is that each node has two properties ([top/bottom], [left/right]), Imagine it like borders in a rectangle, so now you just have to know where you are coming from and move in the right direction depending on the properties.

  • @zahidshaikh3122
    @zahidshaikh3122 Жыл бұрын

    Broo!!!!! You're awesome.

  • @DTSupstateNY
    @DTSupstateNY Жыл бұрын

    I’m in the Bay Area cali response “ohh ok” lol classic small chat with a guy who stays in front of the computer all day

  • @pyrolight7568
    @pyrolight75683 жыл бұрын

    Honestly if I was in an interview my first question would be, "Does your coding test have a binary tree in it?" If they say yes, "sorry your company is way too pretentious to work for, thank you for the consideration"

  • @jason_miller

    @jason_miller

    3 жыл бұрын

    Seriously! - Not to mention this guy was probably hired and then has been building HTML layouts ever since! LOL

  • @jason_miller

    @jason_miller

    3 жыл бұрын

    @Yash Dwivedi You clearly missed the point. So we’re good, I don’t require your help.

  • @seamieshame

    @seamieshame

    3 жыл бұрын

    😆😂💯

  • @nathansire6623

    @nathansire6623

    2 жыл бұрын

    Actually not a bad question since 50% of companies ask this stuff. And they expect you to memorize every line of it.

  • @seamieshame

    @seamieshame

    2 жыл бұрын

    @@nathansire6623 Personally as a developer that values myself and my time, I will say no to a company that asks stupid questions in interviews. & I did actually reject an offer for this reason 2 weeks ago.

  • @kiwiwelch3620
    @kiwiwelch3620 Жыл бұрын

    These are the most helpful comments I've ever observed in a youtube video

  • @cedrickossi
    @cedrickossi2 жыл бұрын

    You are a legend bro!

  • @siddhantpathak2063
    @siddhantpathak20633 жыл бұрын

    I want this guy as my interviewer

  • @geneanthony3421
    @geneanthony34212 жыл бұрын

    I don't know what it is with software interviews. I'm been programming for quite a number of years and anytime I've seen these posted I never think I'd pass an interview. If I was interviewing someone for a job I'd want to see some of their past projects to see what they've done in the past, I'd have them explain why they did something a certain way if it didn't make sense, etc. You can get a good idea of how someone is by how they answer some questions. I'd probably then give them a small assignment or 2 and have them work it to see how it worked. Even in some of these interviews I hear them asking people to use Word or something to write out a program.

  • @carsonjohnson8714
    @carsonjohnson8714 Жыл бұрын

    Learned so much in this!!

  • @doertedev
    @doertedev2 жыл бұрын

    This is a posterchild example for both the fact that search function coding tasks whilst paired and following complexity questions are nonsense. Thanks.

  • @dmadhurima
    @dmadhurima3 жыл бұрын

    Here from hated tarun 😁

  • @vasum5866
    @vasum58663 жыл бұрын

    Seeing that there is no preference for right or left, parent or child nodes maybe you should just flatten this tree into a hashmap, sort in increasing order and return the next node to the number given.

  • @AtanasMinkovFeed
    @AtanasMinkovFeed3 жыл бұрын

    I love this kind of coding tasks, so primitive, so satisfying.