Leetcode 1110. Delete Nodes And Return Forest
Delete the nodes whose values are in to_delete from a binary tree and return the roots of the resulting forest. The core challenge is traversing the tree to detach deleted nodes from their parents and collect any children that become new roots (use a hash set for fast membership checks).
Asked at:
Google
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early September, 2026
Mid-level
The same question but array input was given instead of Tree. one had to first convert array to tree
Hello Interview Premium
Your account is free and you can post anonymously if you choose.