Given a binary tree and a target value, delete all leaf nodes that have a value equal to the target. If removing a leaf node causes its parent to become a new leaf node with the target value, it must…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.