Coding Interview | Software Engineer @ Bloomberg (Part 1)

  Рет қаралды 4,636,090

Keep On Coding

Keep On Coding

Күн бұрын

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
@druvak 3 жыл бұрын
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
@TheAbhorrent1 3 жыл бұрын
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
@pranjaldoorwar9743 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@FF18Cloud haha 😂
@microapple97
@microapple97 2 жыл бұрын
😂😂😂
@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.
@Gotejjeken
@Gotejjeken 3 жыл бұрын
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) .
@akzarma
@akzarma 3 жыл бұрын
**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
@geecee1990
@geecee1990 3 жыл бұрын
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
@jacquesduplessis8944
@jacquesduplessis8944 3 жыл бұрын
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 3 жыл бұрын
Underrated comment
@shockbilegaming8865
@shockbilegaming8865 3 жыл бұрын
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?!
@nomadsome
@nomadsome 3 жыл бұрын
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..
@jedlechner3788
@jedlechner3788 2 жыл бұрын
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.
@northpolenate
@northpolenate 7 ай бұрын
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
@AtriTripathi
@AtriTripathi 3 жыл бұрын
Please do and upload more of these kinds of videos. These live interviews really help. Thanks a lot!
@fajar2742
@fajar2742 3 жыл бұрын
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 3 жыл бұрын
@@surgeif 😂
@Mrdresden
@Mrdresden 3 жыл бұрын
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 8 ай бұрын
But not in 20 min in front of someone., That's not the same thing. It's bullshit.
@JustinK0
@JustinK0 5 ай бұрын
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
@ikeo8666
@ikeo8666 2 жыл бұрын
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
@AdityaSingh-cv9nl
@AdityaSingh-cv9nl 3 жыл бұрын
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
@xinli8194
@xinli8194 3 жыл бұрын
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.
@tommallama9663
@tommallama9663 3 жыл бұрын
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 7 ай бұрын
can you help a brother out, been trying to find a job@@tommallama9663
@imfrommars7362
@imfrommars7362 2 ай бұрын
@@tommallama9663 yo dude how's everything going now?
@tommallama9663
@tommallama9663 2 ай бұрын
@@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!
@JimzZel
@JimzZel 2 жыл бұрын
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.
@tuananh284220
@tuananh284220 3 жыл бұрын
Nice zoom meeting of 2 guys trying to complete final project before Thanksgivings!
@JRoblesCares
@JRoblesCares 3 жыл бұрын
hahahahahaha!!
@michaelnaylor8245
@michaelnaylor8245 3 жыл бұрын
It seems like they’re interviewing each other. I think it was more of a collaborative problem solving exercise
@aminsehla3814
@aminsehla3814 Ай бұрын
and that's great way to find solution in corporation, so why not
@francksgenlecroyant
@francksgenlecroyant 3 жыл бұрын
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!
@itsukiuehara6292
@itsukiuehara6292 3 жыл бұрын
maybe he is hiring for a "binary tree interviewer position" that is why they are discussing binary trees.
@JM-gz1ej
@JM-gz1ej 3 жыл бұрын
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.
@RadojeFrom
@RadojeFrom 3 жыл бұрын
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!
@bran_rx
@bran_rx 3 жыл бұрын
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
@shivamrajawat3322
@shivamrajawat3322 3 жыл бұрын
Man I just subscribed. This was awesome. I learned a lot
@Asiagosik
@Asiagosik 3 жыл бұрын
During Bloomberg technical rounds, the person being interviewed isn't usually asked to compile the code
@nathansire6623
@nathansire6623 3 жыл бұрын
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?
@rajatmishra6628
@rajatmishra6628 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
Rajat Mishra I Need A Software Engineer please Reply Sir
@leetkhan
@leetkhan 3 жыл бұрын
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 9 ай бұрын
Do you think libraries have gotten to the point where the requirement to actually...program is being eroded?
@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 8 ай бұрын
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).
@nikhilraov100
@nikhilraov100 3 жыл бұрын
Nice teamwork and problem solving skills on display by both of them . Kudos to both of you
@danh3363
@danh3363 3 жыл бұрын
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 2 жыл бұрын
@@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
@kartikchauhan1327
@kartikchauhan1327 3 жыл бұрын
Interviewer is very helpful and wants the candidate to come up with the right solution using his own 🧠. That's good to see.
@DanielGuzman31
@DanielGuzman31 3 жыл бұрын
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.
@tridipbaksi2434
@tridipbaksi2434 3 жыл бұрын
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
@keshavnathoo1218
@keshavnathoo1218 3 жыл бұрын
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.
@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.
@dormancygreedy
@dormancygreedy 3 жыл бұрын
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.
@heribertoroman7860
@heribertoroman7860 3 жыл бұрын
This was great thank you! I really need to do more mock interviews after seeing this.
@nothingiseverperfect
@nothingiseverperfect 4 жыл бұрын
OH WAIT. YOU GUYS ARE INTERVIEWING EACHOTHER
@stealthattack2209
@stealthattack2209 3 жыл бұрын
LOL
@dreamhere8306
@dreamhere8306 3 жыл бұрын
No that Indian is interviewing the foreigners
@dave4347
@dave4347 2 жыл бұрын
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 2 жыл бұрын
@@Another0neTime Coding challenges and coding interviews don't go over OOP principles
@erazlle
@erazlle 2 жыл бұрын
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
@minerbob4334
@minerbob4334 3 жыл бұрын
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 2 жыл бұрын
@@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
@ImEmix
@ImEmix 3 жыл бұрын
pretty much giving you the answer the whole way through the interview.
@alvintan2995
@alvintan2995 Жыл бұрын
Really enjoyable looking at this video!
@dingdong3335
@dingdong3335 3 жыл бұрын
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.
@zHqqrdz
@zHqqrdz 3 жыл бұрын
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.
@IsmaelPoteau
@IsmaelPoteau 3 жыл бұрын
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.
@MachiriReviews
@MachiriReviews Жыл бұрын
I finally get it. The best way to use a Binary Search Tree is to interview people. Truly an amazing data structure.
@saravanakumaranmanickam7547
@saravanakumaranmanickam7547 2 жыл бұрын
@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*.
@Andy-wv2xj
@Andy-wv2xj 3 жыл бұрын
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.
@benpurcell591
@benpurcell591 2 жыл бұрын
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...
@TonyDiCroce
@TonyDiCroce 2 жыл бұрын
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.
@christianonwe2045
@christianonwe2045 2 жыл бұрын
This is pretty straight-forward to go through with time-complexity of O(n) and O(n) space complexity
@ajayChauhan-nt5xm
@ajayChauhan-nt5xm 3 жыл бұрын
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.
@vladandrei51
@vladandrei51 3 жыл бұрын
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
@OmarOmar-eo3pw
@OmarOmar-eo3pw Жыл бұрын
I have never had that helpful of an interviewer.
@ediponascimento532
@ediponascimento532 3 жыл бұрын
I liked it. They worked as a team. I think they enjoyed it already.
@juangoria3517
@juangoria3517 3 жыл бұрын
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
@SuddenHamster
@SuddenHamster 3 жыл бұрын
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.
@zhexunchen4539
@zhexunchen4539 3 жыл бұрын
i'd say it's really a good way to prepare for an interview. definitely would try it later after
@carsonjohnson8714
@carsonjohnson8714 2 жыл бұрын
Learned so much in this!!
@Casprizzle
@Casprizzle 3 жыл бұрын
I swear these tests were designed by HR who have no idea what dev is actually like.
@realchrishawkes
@realchrishawkes 3 жыл бұрын
Good video!
@LeoTM
@LeoTM 2 жыл бұрын
amen
@EmadMokhtar
@EmadMokhtar Жыл бұрын
This software engineer isa very nice interviewer. It felt like a pair programming than an interview. Well done.
@emzyempire658
@emzyempire658 2 жыл бұрын
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.
@BENGALReaction
@BENGALReaction 3 жыл бұрын
Logic is right, but the coding will give problem. Good way of showcasing an interview, mostly a discussion of a problem
@shaikzuhair8537
@shaikzuhair8537 3 жыл бұрын
Thanks for u uploading the video..
@TimothyBrake
@TimothyBrake 3 жыл бұрын
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.
@zahidshaikh3122
@zahidshaikh3122 Жыл бұрын
Broo!!!!! You're awesome.
@TheGhost094
@TheGhost094 3 жыл бұрын
Yet to meet a developer who actually used a Binary tree in his work
@iAdrianT
@iAdrianT 3 жыл бұрын
The interviewer!
@revanthsai7894
@revanthsai7894 4 жыл бұрын
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 ?
@blacksaibot6158
@blacksaibot6158 3 жыл бұрын
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
@JW-ku7nn
@JW-ku7nn Жыл бұрын
The pure excitement at the end. "Its working now, cool... cool"
@anubhavsingh9848
@anubhavsingh9848 3 жыл бұрын
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
@berkantasci8811
@berkantasci8811 2 жыл бұрын
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!
@kiwiwelch3620
@kiwiwelch3620 Жыл бұрын
These are the most helpful comments I've ever observed in a youtube video
@therealblacksheep330
@therealblacksheep330 Жыл бұрын
These idiots made it way too complicated. All you have to do is: First, you take the dinglepop, and you smooth it out with a bunch of schleem. The schleem is then repurposed for later batches. Then you take the dinglebop and push it through the grumbo, where the fleeb is rubbed against it. It's important that the fleeb is rubbed, because the fleeb has all of the fleeb juice. Then a Shlami shows up and he rubs it, and spits on it. Then you cut the fleeb. There's several hizzards in the way. The blaffs rub against the chumbles, and the plubus and grumbo are shaved away. That leaves you with a regular old plumbus!
@rahulbhandari3558
@rahulbhandari3558 3 жыл бұрын
His interviewer gave him time to open the door , mine didn't even repeat the question 😭
@Qalupatra
@Qalupatra 3 жыл бұрын
Its not Bloomberg interview. Its Pramp interview who do mock interviews.
@nishantthakur3122
@nishantthakur3122 2 жыл бұрын
Started learning Java yesterday. Clicked this video, now learning history.
@pataka81
@pataka81 3 жыл бұрын
so the answer would be... "so you wanna be a software engineer at google ??" damn clement's ad
@user-eo5bh2zg2f
@user-eo5bh2zg2f 4 жыл бұрын
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.
@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."
@easyj
@easyj 19 күн бұрын
This gets on my nerve so much, had to go through all this as a frontend, been doing it for 8 years now and still baffles me when some small company with a simple app use these kind of problems to evalute the applicants knowing damn well they will never encounter issues like this
@Akaash449
@Akaash449 2 жыл бұрын
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).
@geneanthony3421
@geneanthony3421 2 жыл бұрын
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.
@siddhantpathak2063
@siddhantpathak2063 3 жыл бұрын
I want this guy as my interviewer
@cedrickossi
@cedrickossi 2 жыл бұрын
You are a legend bro!
@doertedev
@doertedev 2 жыл бұрын
This is a posterchild example for both the fact that search function coding tasks whilst paired and following complexity questions are nonsense. Thanks.
@vasum5866
@vasum5866 3 жыл бұрын
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.
@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
@mikel8091
@mikel8091 Жыл бұрын
This problem has an easier solution than shown. Just traverse the tree to find the input node. Save the root node as your return value. When you choose to go left in the search, save your current node as the return value. If the input node is found and has a right node, go right and then left. Return saved node
@MahmoudHMorsy
@MahmoudHMorsy 3 жыл бұрын
I think we could type the recursive function (get left) iterative as While (node!=null&&node.left!=null)node=node.left When this while loop break, node will have the answer
@nothingiseverperfect
@nothingiseverperfect 4 жыл бұрын
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
@gyk9738
@gyk9738 3 жыл бұрын
Didn't see the video ...can we traverse inorder ...and if there is a node after that return it ...or return null
@AtanasMinkovFeed
@AtanasMinkovFeed 3 жыл бұрын
I love this kind of coding tasks, so primitive, so satisfying.
@startupguy
@startupguy 2 жыл бұрын
There is a check missing - consider the example tree, and say, node 25 does not exist, and lets say inputNode = 20. So in the while condition, when you do parent.right, there will be NullPointerException. So before while loop, add `if (parent == null) return null` on line 47 of the code.
Coding Interview | Software Engineer @ Bloomberg (Part 2)
35:34
Keep On Coding
Рет қаралды 416 М.
Google Coding Interview With A High School Student
57:24
Clément Mihailescu
Рет қаралды 4 МЛН
Do you have a friend like this? 🤣#shorts
00:12
dednahype
Рет қаралды 58 МЛН
когда достали одноклассники!
00:49
БРУНО
Рет қаралды 4,1 МЛН
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin
Рет қаралды 9 МЛН
Coding Interviews Be Like
5:31
Nicholas T.
Рет қаралды 6 МЛН
a day in the life of an engineer working from home
8:42
Joma Tech
Рет қаралды 20 МЛН
I Asked Microsoft Software Engineers How To Get Hired
10:34
Namanh Kapur
Рет қаралды 351 М.
How I Programmed a SaaS (Login, Payments, Cloud Hosting)
9:31
Keep On Coding
Рет қаралды 10 М.
How I would learn to code (if I could start over)
10:52
PIRATE KING
Рет қаралды 1,3 МЛН
Top 6 Coding Interview Concepts (Data Structures & Algorithms)
10:51
Meta Interview Experience 2024 | Software Engineer
9:55
Keep On Coding
Рет қаралды 36 М.
Do you have a friend like this? 🤣#shorts
00:12
dednahype
Рет қаралды 58 МЛН