Available question text
Given a binary tree and a target value, repeatedly remove all leaf nodes whose value equals the target; removals may create new leaves that also equal the target, so you must prune until no such leaves remain. This is typically solved with a post-order (bottom-up) traversal to decide whether to delete each node.
Related questions
Continue with questions that share topics or the same question type.
- Count Paths With the Given XOR Value
Coding
- Delete Greatest Value in Each Row
Coding
- Find Substring With Given Hash Value
Coding
- Given an array nums and a sliding window of size k moving from the very left to the very right, return the maximum value in the window for each position. Solve in O(n) time using a deque.
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1325. Delete Leaves With a Given Value
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source