LogRocket interview question

Removing nodes from binary tree