Wednesday, November 12, 2014

Data Structures - Unit 3

1.Define post-order traversal? 
Post order traversal entails the following steps;

a. Process the left subtree
b. Process the right subtree
c. Process the root node

2. Define in -order traversal? 
In-order traversal entails the following steps;
a. Process the left subtree
b. Process the root node
c. Process the right subtree

3. What is a balance factor in AVL trees? 
Balance factor of a node is defined to be the difference between the height of the node's left subtree and the height of the node's right subtree.

4. What is meant by pivot node? 
The node to be inserted travel down the appropriate branch track along the way of the deepest level node on the branch that has a balance factor of +1 or -1 is called pivot node.

5. What is the length of the path in a tree? 
The length of the path is the number of edges on the path. In a tree there is exactly one path form the root to each node.

6. Define expression trees? 
The leaves of an expression tree are operands such as constants or variable names and the other nodes contain operators.


7. What is the need for hashing?
Hashing is used to perform insertions, deletions and find in constant average time.


8. Define hash function?
Hash function takes an identifier and computes the address of that identifier in the hash table using some function.

9. List out the different types of hashing functions? 
The different types of hashing functions are,
a. The division method
b. The mind square method
c. The folding method
d. Multiplicative hashing
e. Digit analysis

10. What are the problems in hashing? 
a. Collision
b. Overflow

11. What are the problems in hashing? 
When two keys compute in to the same location or address in the hash table through any of the hashing function then it is termed collision.

No comments:

Post a Comment