Python Interview with an Amazon Engineer (Next Largest in BST)

Next largest in Binary Search Tree (Amazon)

Watch someone solve the next largest in bst problem in an interview with an Amazon engineer and see the feedback their interviewer left them. Explore this problem and others in our library of interview replays.

Next Largest in BST: Python interview with an Amazon engineer - YouTube

Next Largest in BST: Python interview with an Amazon engineer

Interview Summary

Problem type
Next largest in BST

Interview question

  1. Find the next largest node in a BST given the root and the target node.
  2. How would you modify this if you wanted to find the next smallest?
  3. How would you modify this if you were not given the root node?

Interview Feedback

Feedback about Vermillion Tortoise (the interviewee)
Advance this person to the next round?
Yes
How were their technical skills?
4/4
How was their problem solving ability?
4/4
What about their communication ability?
4/4

Continue to write pseudo-code before coding it out, it still seems to help a lot by being a bridge between translating thoughts into implementation.

Feedback about Strident Sardine (the interviewer)
Would you want to work with this person?
Yes
How excited would you be to work with them?
4/4
How good were the questions?
4/4
How helpful was your interviewer in guiding you to the solution(s)?
4/4

The interview was very professional & included interesting follow-up questions - great job.

Interview Transcript

Vermillion Tortoise: Hey.

Strident Sardine: Hi, how's it going?
Vermillion Tortoise: Hey, good.
Strident Sardine: Cool. So I was just looking over your details. This is for a junior engineering position, is that correct?
Vermillion Tortoise: Yes. So it's probably for an SDE 2 position. I'm not sure. I think that might be mid-level for Amazon, but I would probably be looking to enter in as a sort of lower level SDE 2.
Strident Sardine: Okay, okay. Alright, I guess I would usually consider that more on the senior side, yeah. Okay, well, okay, maybe I'll think of a different question then. Okay cool, let's go with this one and yeah and if we have time, we'll do another question or I can follow up with some follow-up questions.

...

Vermillion Tortoise: I gotcha. Yeah, I definitely agree. I think that as soon as I started coding I kind of wish that I had done a little bit more pseudo code, so that's definitely some room for improvement there and then that conditional, but that makes sense.

Strident Sardine: Yeah, yeah. I don't know if I really have anything else to say. Do you have any questions for me?

Vermillion Tortoise: Yeah, so let's see... so I have a virtual on-site on Friday. I think...

Strident Sardine: Which company?
Vermillion Tortoise: With Amazon. And it will be four 1 hour interviews. I think that there's you know 30 to 40 minutes slated for the technical question and then there's the behavioral after and I'm aware that Amazon behavioral is unique because they have these principles that they really value and you have to have a stories that speak each of the different leadership principles. So three of the technical interviews are coding algorithm and then there's one system design question. I think one thing I'm a little bit curious about is if in your interview or any interviews that you were a part of, if you guys did any object oriented stuff that you know, like object oriented design patterns and what the expectations there were?

Strident Sardine: So I think that for a SD2 position, you're most likely going to have more of a system architecture interview rather than an object oriented interview. Those are slated more for junior candidates. Having said that, I would not be surprised if someone asked a little bit about object-oriented design. But I think you should primarily expect the architecture interview, not the object oriented one. Yeah and you're right, the leadership principles are heavily emphasized at Amazon, as opposed to Google or Facebook that are very heavy on the technical side. They weight that a lot more than your behavioral stories. So I think you're right, you're definitely, you know... it seems like you're coding skills are you know up to the hiring threshold that they would probably be looking for and your time would probably be better spent looking at behavioral and system design concepts.

Strident Sardine: Okay, cool. Alright, well, I don't have anything else. I'll go ahead and select like yes for keeping in touch or stay in contact, revealing the contact information. And yeah, so if you'd like to do that, you know, we can we can stay in touch.

Vermillion Tortoise: Yeah, absolutely that sounds great. I'll do the same.

Strident Sardine: Okay, cool. Alright have a good day.

Vermillion Tortoise: Alright, take care you too.