← Google questions
CodingMediumReported in a candidate post, Mar 2024

Delete nodes and return forest

Filed under Google

Given the root of a binary tree and an array of distinct integers representing node values to delete, delete all nodes with values present in the array and return a list of roots of the resulting…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Google questions

Collected from public candidate posts and coding forums. Updated Nov 2026.