We helped write the sequel to "Cracking the Coding Interview". [Read 9 chapters for free →](https://bctci.co/free-chapters)

Please read our [definitive guide on Google's hiring process and questions](/content/guides/hiring-process/google/index.html)

# Python Interview with a Google engineer

#### Watch someone solve the binary tree upside down problem in an interview with a Google engineer and see the feedback their interviewer left them. Explore this problem and others in our library of interview replays.

Python interview with a Google engineer: Binary tree upside down - YouTube

### Interview Summary

**Problem type**  
Binary tree upside down  
**Interview question**  
1) Given a binary tree where every node has either 0 or 2 children and every right node is a leaf node, flip it upside down turning it into a binary tree where all left nodes are leaves.

2) Find all palindromic decompositions of a given string s.

Read more about the questions

- [Binary Tree Upside Down](/content/questions/binary-tree-upside-down/index.html)

### Interview Feedback

**Feedback about Occam's Malamute (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  
> Discussed in the call, overall really great technically sound. Map out approach is the only improvement and is minor.

**Feedback about Ferocious Chameleon (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  
> Good combination of pushing an interviewee in a direction you want them to go and letting them work on a problem!  
You also did a great job quickly coming out with very applicable questions.

### Interview Transcript

**Occam's Malamute:** Hello.

**Ferocious Chameleon:** Hello. How's it going?

**Occam's Malamute:** It's going well, thank you. How are you doing?

**Ferocious Chameleon:** Pretty well. Can you give me a little background about yourself?

**Occam's Malamute:** Yes, sure. I am coming from a more academical background. And what I do now is called machine learning. And I work in one of the big tech companies, and I'm interviewing with another big tech company. And I somehow landed in the final round, that will happen in like four weeks. And I'm just have to prepare for my final round. And I originally have no computer science background. So everything I learned, I learned on my own, pretty much. And that's pretty much it. So I'm trying to focus on solving problems that are kinda on the medium level, but I'm trying to solve them efficiently, fast, and without too much typos.

**Ferocious Chameleon:** Okay, so, I'll go ahead and paste the problem I have for you. So, this is the description. The problem itself is called upside down. And I'll draw it out, I'm going to draw an example here.

**Occam's Malamute:** So are you going to draw it or do I need to start working?

**Ferocious Chameleon:** Yeah, so if you look at the draw section.

**Occam's Malamute:** Okay, I got it. Thank you.

### (Transcription continues with detailed communication about problem-solving approach)

**Ferocious Chameleon:** Okay. So as far as... So, you proceed, how will you set two as right and? Or sorry, how will you set two as left?

**Occam's Malamute:** Understood, so I guess I do it here.

### Coding Discussion (Transcription continues with greater detail on code implementation)

**Ferocious Chameleon:** So, is it right? You can assume that tree nodes must be properly linked. So, how do you plan to handle edge cases?  
**Occam's Malamute:** Yes.

### (Discussion on potential algorithms and approaches continues)

> **Technical assessments of algorithm efficiency were also discussed.**

### Overall Feedback

**Ferocious Chameleon:** If you have time, would you like to do feedback now or would you prefer it in a different format?

**Occam's Malamute:** If you have willingness to do it now...

**Ferocious Chameleon:** I have time to do it now.

### Conclusion

- The interview covered several advanced technical topics focusing on binary tree operations and string manipulations.
- The communication and technical skill levels were assessed positively with minor areas for improvement noted.
