This is ridiculous I've been a binary search tree for 30 years and never once have I had a software engineer traverse me.
I've been a software engineer for 24 years. I've never ever needed to write a binary search function.
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.
This interviewer giving a lot of guidance. I’d be grateful to have him. Other interviews don’t really do that
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.
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.
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.
Interview: Search a binary tree. Job: Please make CTA blue, client said her favorite color is blue.
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
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.
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.
Majority of software engineers never work on these nonsense in day to day work
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.
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.
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.
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.
*Code runs successfully* Him: cool Interviewer: cool. *leaves the meeting*
me : can i go to the bathroom sir ? i think i have diarrhoea . *comeback with the solution from stackoverflow
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
@KeepOnCoding