Delete leaf nodes with value as x
Given a binary tree and a target integer x, delete all the leaf nodes having value as x. Also, delete the newly formed leaves with the target value as x.
Input : x = 5 6 / \ 5 4 / \ \ 1 2 5 Output : 6 / \ 5 4 / \ 1 2 Inorder Traversal is 1 5 2 6 4
Construct a Tree whose sum of nodes of all the root to leaf path is not divisible by the count of nodes in that path