You are on page 1of 2

1.

----------- traversal is used to get a prefix expression from an expression


tree.
Answers
1. PostOrder
**2. PreOrder
3. InOroder
4. All of the above

2. A graph with all vertices having equal degree is known as a __________


Answers
1. Multi Graph
**2. Regular Graph
3. Simple Graph
4. Complete Graph

3. What is a hash table?


Answers
1. A structure that maps values to keys
**2. A structure that maps keys to values
3. A structure used for storage
4. A structure used to implement stack and queue

4. 6. Which of the following is not application of graph ?


Answers
1. Coloring of maps algorithms
2. Job scheduling
3. Web Page navigation
**4. Redo / Undo actions

5. A binary tree whose every node has either zero or two children is called
Answers
**1. Complete binary tree
2. Binary search tree
3. Extended binary tree
4. None of above

6. Given an adjacency matrix A = [ [0, 1, 1], [1, 0, 1], [1, 1, 0] ], The total no.
of ways in which every vertex can walk to itself using 2 edges is ________
Answers
1. 2
2. 4
**3. 6
4. 8

7. Assume that a structure for a Binary Search Tree exists. What does the following
function do?
int function(root)
{
current = root;
while (current->left != NULL)
{
current = current->left;
}
return(current->data);
}
Answers
**1. Left most child of BST.
2. Right most child of BST.
3. subtrees of BST
4. None above mentioned

8. What is perfect binary tree?


Answers
1. In perfect binary tree all the internal nodes have 2 childrens?
2. All the leaf nodes are at same level.
**3. BOTH are TRUE
4. BOTH are FALSE

9. The post order traversal of binary tree is DEBFCA. Find out the pre order
traversal.
Answers
1. ABFCDE
2. ADBFEC
**3. ABDECF
4. ABDCEF

10. What is not true about Graph :


Answers
1. Graphs can be Cyclic or Acyclic.
2. Graph is a network model.
**3. Graph can be linear
4. graph can have unidirectional or bi-directional paths between nodes

You might also like