Given a Binary Tree and a function predict. You need to call predict function for every node, if it returns true the node is marked deleted. You need to remove the nodes from the tree , which satisfies the either of below 2 conditions :
a) Node is marked deleted
b) Node's parent is not marked deleted
Return the list of remaining nodes in the Tree.