Given a Binary Tree and an array arr[] consisting of values of nodes to be deleted, the task is to print Inorder Traversal of the forests after deleting the nodes.
Examples:
Input:_ arr[] = {10, 5} _
10
/ \
20 30
/ \ \
4 5 7
Output:
_4 20 _
30 7
_Input: __arr[] = {5} _
1
/ \
5 6
/ \
10 12
Output:
_10 _
1 6 12
Approach: Follow the below steps to solve the problem:
#big data