Binary Tree Pruning Solution