R22 II-B.Tech.
I Sem MID – II Examination
Subject: Data Structures Branch: CSE(AI&DS) ,CSE( CS),CSE
Date: SET No: 4
Name of the Student: Hall Ticket
No:
Answer All Questions. All Questions Carry Equal Marks. Time: 20 Min. Marks: 10.
I. Choose the correct alternative:
1. ________ representation uses linked list to represent graph information in memory[ ]
(a) Adjacency List
(b) Adjacency Matrix
(c) Adjacency Multi List
(d) None.
2. _______ data structure is used to implement BFS. [ ]
(a) Stack
(b) Queue
(c) List
(d) Tree
3. The Maximum no. of Edges In a Directed Graph with ‘n’ vertices has [ ]
(a)n(n-1)/2 (b) (n-1)/2
(c)2n+1 (d) 2(n-1)
4. Out degree of a leaf node in a binary tree is _______. [ ]
(a) 3
(b) 0
(c) 2
(d) 1
5. ________ is a Balanced Binary search tree. [ ]
(a) Binary Tree
(b) Binary Search Tree
(c) AVL Tree
(d) None
6. Which of the following sorting algorithm follows Divide-and-conquer strategy? [ ]
(a) Merge sort
(b) Bubble sort
(c) Insertion sort
(d) Selection sort
7. ______ data structure is used to implement a Heap sort. [ ]
(a) Array
(b) List
(c) Heap
8.BFS is equivalent to which ONE of the following tree traversal techniques? [ ]
(a) Preorder
(b) Postorder
(c) Levelorder
(d) Inorder
9. The inorder and preorder traversal of a binary tree are respectively, D B C A F E G
and A B D C E F G. The postorder traversal is _______. [ ]
(a) D E B F G C A
(b) E D B G F C A
(c) E D B F G C A
(d) D C B F G E A
10. What is the time complexity for inserting an element in an AVL tree? [ ]
(a) O(n*log(n))
(b) O(log(n))
(c) O(n*n)
(d) O(n)
II. Fill in the Blanks
11. AMax
_______
Heapis a tree in which value of each node is greater than its children.
12. The no. of edges incident to vertex ‘v’ in a Directed Graph is called _________
Degree of the Vertex
13. _______
Adjacency List is the technique to represent a graph in memory.
14. A Directed graph with n nodes must have a minimum of _______
Zero edges.
15. A full binary tree with n leaf nodes contains _________
2n-1 nodes.
16. The root of the Red and Black tree is always _______.
Black
17. _______
Linear Search is a process that checks every element in the list sequentially until the desired
element is found.
18. The process of bringing the element from its current position to the root is called______.
Splaying
19.
Knuth _______
Morris Pratt is a pattern matching algorithm
20. The balance factor of a node in an AVL tree is _______.
Height of Left subtree-Height of Right sub tree