Podcasts · Whiteboard Confidential

Delete Nodes and Return Forest: Python Interview with a Google Engineer

· 50 min

Episode Delete Nodes and Return Forest: Python Interview with a Google Engineer

0:00 50:17

REPLAY EPISODE: In this Google coding interview mock, a candidate tackles one of the trickiest binary tree problems that keeps showing up in real interviews.

🧩 Problem: Given the root of a binary tree and a list of node values to delete, remove those nodes and return the roots of all remaining subtrees. (LeetCode #1110 – Delete Nodes and Return Forest)

Watch how the candidate breaks it down from scratch:

✅ Clarifies the problem and edge cases like a real Google interview

✅ Designs an O(n) BFS solution (with clean logic)

✅ Codes in Python and tests multiple tricky examples

✅ Gets detailed interviewer feedback on problem-solving, communication, and structure

💡 What you’ll learn:

• How to think out loud in a Google interview

• BFS vs DFS strategies for tree deletion problems

• How to handle “delete and return forest”–type graph problems

• What great communication looks like under pressure

👉 Sign up to book coaching or to watch more interviews in our showcase: https://www.interviewing.io

🔗 Or view other Google interviews: https://interviewing.io/mocks?company=googleDisclaimer: All interviews are shared with explicit permission from the interviewer and the interviewee, and all interviews are anonymous. interviewing.io has the sole right to distribute this content.

The episode on the publisher’s site (opens in a new tab)

Shows are listed from Apple Podcasts' charts and directory, and Podcast Index where it is used. Every show and episode belongs to its publisher and plays from the publisher's own feed; this site hosts none of them. Explicit shows are for adult profiles only, and children’s profiles hear only children’s shows. More about this list.