Sunday, 29 October 2017

Important Short answer type question on Tree data structure

Q 1.  Give some applications of Trees.
1. Implementing the file system of operating systems.
2. Evaluation of arithmetic expression.
3. Gaming/Decision making problems.

Q 2.  Define node, degree, siblings, depth/height, level taking a tree data structure into consideration.
1. Node: A node is an item of information with branches to other items.
2. Degree: The number of sub-trees of a node is called is degree.
3. Siblings: The children of the same parent is said to be siblings.
4. Level: The level of a node is defined recursively by assuming the level of the root to be one and if a node is at level n, then its children at level n +1.
5. Depth/Height: The depth/height of a tree is defined to be the level of a node which is maximum.

Q 3. Define a path in a tree data structure.
A path in a tree is a sequence of distinct nodes in which successive nodes are connected by edges in the tree.

Q 4. Define terminal nodes in a tree data structure.
A node which has no children is called a terminal node.It is also referred as a leaf node.these nodes have a degree as zero.

Q 5. Define non-terminal nodes in a tree data structure.
All intermediate nodes that traverse the given tree from its root node to the terminal nodes are referred as terminal nodes.

Q 6. Define a Binary tree data structure.
A Binary Tree is a tree,which has nodes either empty or not more than two child nodes,each of which may be a leaf node.

Q 7. Define a full binary tree data structure.
A full binary tree,is a tree in which all the leaves are on the same level and every non-leaf node has exactly two children.

Q. 8 Define a complete binary tree data structure.
A complete binary tree is a tree in which every non-leaf node has exactly two children not necessarily to be on the same level.

Q 9. Define a right-skewed binary tree data structure.
A right-skewed binary tree is a tree,which has only right child nodes.

Q 10. What are the different ways of representing a Binary tree data structure?
1. Linear Representation using Arrays.
2. Linked Representation using Pointers.


Thanks
Mukesh Rajput

No comments:

Post a Comment

Thanks
Mukesh Rajput