# Java Interview with a FAANG engineer

### Interview Summary

**Problem type**  
Reconstruct Itinerary  
**Interview question**  
You are given a list of airline tickets where tickets[i] = [fromi, toi] represent the departure and the arrival airports of one flight. Reconstruct the itinerary in order and return it.

### Interview Feedback

**Feedback about Wandering Nougat (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

> Overall Feedback: *Inclined to Hire*  
> - Strong knowledge of both data structures and algorithms  
> - Was able to quickly identify the optimal DFS solution as well as the helper data structures to use for this problem  
> - Nice use of TreeMap to handle the lexical order sorting  
> - Very good mastery of language of choice  
> - Strong knowledge of available data structures  
>  
> **Things to keep doing:**  
> - Very good communication, talked through the problem fully before getting into the code.  
> - Great job of explaining thought process as you were coding  
>
> **Things to improve:**  
> - Try to work on catching a few of those edge cases up front before getting into the code. I think overall you did a good job of coming up with a solution before coding, but doing a dry run of the code might have helped.

**Feedback about Recursive Werewolf (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)?**  
3/4

### Interview Transcript

**Recursive Werewolf:** okay, can you hear me okay?  
**Wandering Nougat:** Yeah.  
**Recursive Werewolf:** Okay, great. I switched over to phone. So yeah, great to be here today. My name is Brandon. I'm currently a software engineer full stack. I'll be doing your interviews here today. We're gonna start off with a few questions that just helped me determine what to ask here and how to grade. How much experience do you have?  
**Wandering Nougat:** I have 3-4 years of experience technically like one year or two years experience in India in my home country and one and a half years here in US.  
**Recursive Werewolf:** Okay, so are you going for like mid level positions or senior?  
**Wandering Nougat:** Yeah, mid level SD 2  
**Recursive Werewolf:** Mid level, okay. And then are there any specific companies that you're targeting?  
**Wandering Nougat:** Yeah, mostly FAANG, Amazon, yeah for now.  
**Recursive Werewolf:** Okay cool, ya no that that helps a lot. So in the top right corner of the screen, you'll see a drop down to select your preferred language so you can go ahead and select that.  
**Wandering Nougat:** Yeah.  
**Recursive Werewolf:** Cool and then let me grab, you said Amazon?  
**Wandering Nougat:** Yeah.  
**Recursive Werewolf:** Okay, I actually just interviewed there so I can give you the question I got let me let me find it.  
**Wandering Nougat:** You did for mid level or senior level?  
**Recursive Werewolf:** Yeah, what do you say?  
**Wandering Nougat:** You did the interview for mid level or senior level position.  
**Recursive Werewolf:** Yeah, I just interviewed as SDE 2 there actually. So I can give you this. So this is definitely on the harder side of things. If this one you think is just too tough to do right now just let me know and we'll ask another one I don't want I want to use your time the best so let's see here's what we have. Let me think of how to, some examples here.

**Wandering Nougat:** [Reading question quietly]. Okay so this is sort of okay we are given multiple stops. So the first glance of it gives me that it's a sort of data structure, which is probably hinting the towards doing some search on the input. So what searches like what I'm going to do is what like that's my first thought is what it's saying is it's given a bunch of start and end stops. And JFK is my starting stop and I need to sort of. So what's the is there an ending stop in this?  
**Recursive Werewolf:** Yeah, so it should visit all the places in there. And there will be at least one valid option. So you're going to use all the inputs.
