Given a binary tree and an integer. You need to find the number of subtrees having the sum of all of its nodes equal to given Integer, that is, Target sum.
Given a binary tree and an integer. You need to find the number of subtrees having the sum of all of its nodes equal to given Integer, that is, Target sum.
You need to write a java program to find maximum element in binary tree.
Given a node, you need to find level of a node. For example : Level of node will 3 for node 70 used in Question 14.
You need to write a java program to count leaf nodes of a binary tree.
The count of Leaf nodes for the binary tree used in Question 15 is 5.Steps for counting number of leaf nodes are:
You need to write java program to do level order traversal of binary tree. You can use queue data structure to do level order traversal.
PostOrder traversal
InOrder traversal: