Monday, November 10, 2014

Data Structures - Unit 3

1. Define non-linear data structure 
Data structure which is capable of expressing more complex relationship than that of physical adjacency is called non-linear data structure.

2. Define tree? 
A tree is a data structure, which represents hierarchical relationship between individual data items.

3. Define leaf? 
In a directed tree any node which has out degree o is called a terminal node or a leaf.

4. What is meant by directed tree? 
Directed tree is an acyclic diagraph which has one node called its root with indegree o whille all other nodes have indegree I.

5. What is a ordered tree? 
In a directed tree if the ordering of the nodes at each level is prescribed then such a tree is called ordered tree.


6. What are the applications of binary tree? 
Binary tree is used in data processing.
a. File index schemes
b. Hierarchical database management system

7. What is meant by traversing? 
Traversing a tree means processing it in such a way, that each node is visited only once.

8. What are the different types of traversing? 
The different types of traversing are
a. Pre-order traversal-yields prefix from of expression.
b. In-order traversal-yields infix form of expression.
c. Post-order traversal-yields postfix from of expression.

9. What are the two methods of binary tree implementation? 
Two methods to implement a binary tree are,
a. Linear representation.
b. Linked representation


10. Define pre-order traversal?
Pre-order traversal entails the following steps;
a. Process the root node
b. Process the left subtree
c. Process the right subtree 

No comments:

Post a Comment