LogRocket Interview Question

Algorithm question related to trees and removing nodes from the tree