The Answer to the Question
is below this banner.
Here's the Solution to this Question
Degree of node:is the total number of children
Of that node
Degree of A is 2
Degree of B is 2
Degree of c is 3
Copies of binary tree:
Let "root" be the root node of binary tree.
- If root is equal to NULL, then return NULL.
- Create a new node and copy data of root node into new node.
- Recursively, create clone of left sub tree and make it left sub tree of new node.
- Recursively, create clone of right sub tree and make it right sub tree of new node.
- Return new node.
In many application programmer wants to duplicate a tree structure
Copy a tree structure using postorder scan.This build the duplicate from bottom up