II-I CSE DS II-MID Objective
II-I CSE DS II-MID Objective
a) 2l-1 b) l-1 c) l d) 2l 17. The process where two rotations are required to balance a tree is called
_________________
5. Which of the following an external sorting technique ( )
18. When the height of the left subtree and right subtree of a node in an AVL Tree
A. Quick Sort B. Merge Sort C. Selection Sort D. Insertion Sort are equal the balancing factor is _____________________.
6. The average depth of binary search tree is ( ) 19. The __________________ of a vertex is the number of edges this vertex has that
are connected to other vertices.
A. o(n/2) B. o(n ) C .o(log n) D .o(n2)
20. The weight or value of an edge is also called ___________________.
7. Comparisons in Brute-Force is ( )
3. Why we need to a binary tree which is height balanced? () 13. In a Maxheap data structure, the_______________ element is placed in the root
a) to avoid formation of skew trees b) to save memory of the heap.
c) to attain faster memory access d) to simplify storing 14. In a Minheap data structure, the _______________ element is placed in the root
4. A BST is traversed in the following order recursively: Right, root, left of the heap.
the output sequence will be in ( ) 15. ______________is known as compressed Trie.
a). ascending orderb). Descending order c). Sequence d)No specific order 16.The root of a red black tree is always ____________________.
5.A graph with all vertices having equal degree is known as a ( ) 17. A red-black tree is a self-balancing tree structure that applies a ______________
a) Multi Graph b) Regular Graph to each of its nodes.
c) Simple Graph d) Complete Graph
18. In an AVL tree, the heights of the two child subtrees of any node differ by at
6. Which of the following ways can be used to represent a graph? ( ) most_______________
a) Adjacency List and Adjacency Matrix b) Incidence Matrix
c) sparse Matrix d) No way to represent 19. The operation of processing each element in the list is known as
____________________
7. The Data structure used in standard implementation of Breadth First Search is( )
a) Stack b) Queue c) Linked List d) Tree 20. A graph is said to be __________________ if every vertex' u ' in graph ' G ' is
adjacent to every other vertex ' v ' in graph ' G ',
8. The Breadth First Search traversal of a graph will result into? ( )
a) Linked List b) Tree c) Graph with back edges d) Arrays o0o-
SUMATHI REDDY INSTITUTE OF TECHNOLOGY FOR WOMEN
II B.Tech. I Sem IIMid-Term Examinations, March/April-2023 9.The Data structure used in standard implementation of Breadth First Search is?( )
a) Stack b) Queue
DATASTRUCTURES
Objective Exam c) Linked List d) Tree
SET-III
10. The Breadth First Search traversal of a graph will result into? ( )a) Linked
List b) Tree c) Graph with back edges d) Arrays
Name: _________________________ H.T. No. ______________________________
II .Fill in the blanks
I. Choose the correct answers
11. In ____________________representation, every vertex of a graph contains list
1. In which case adjacency list is preferred in front of an adjacency matrix? () of its adjacent vertices
a) Dense graph b) Sparse graph
12. Graph traversal is a technique used for a searching ________________in a
c) Adjacency list is always preferred d) Complete graph graph.
2. The number of elements in the adjacency matrix of a graph having 7 vertices ( ) 13. A __________________is also known as generate and test10. Sequential search
a) 7 b) 14 c) 36 d) 49 is also considered as and referred as __________________.
3.What is the number of edges present in a complete graph having n vertices? ( ) 14. In a__________________ every new node operation is performed such that it
a) (n*(n+1))/2 b) (n*(n-1))/2 moves to the root of the tree.
c) n d) Information given is insufficient
15.If preorder of the binary tree is A B D H E C F I G J K, then the postorder of the
4.Which of the following properties does a simple graph not hold? () binary tree will be ____________________
a) Must be connected b) Must be unweighted
16. what is the value which cannot be a balance factor of any node of an AVL tree
c)must be not connected d)None of these ____________
5. What is the maximum number of edges in a bipartite graph having 10 vertices( ) 17.InZig rotation, every node moves one position to the _______________ from its
a) 24 b) 21 c) 25 d) 16 current position.
6. For a given graph G having v vertices and e edges which is connected and has no 18.Inzag rotation, every node moves one position to the ______________ from its
cycles, which of the following statements is true? ( ) current position.
a) v=e b) v = e+1 c) v + 1 = e d) v = e-1
19.The___________________in splay tree ,every node moves two positions to the
7.A graph with all vertices having equal degree is known as a ( ) right from its current position
a) Multi Graph b) Regular Graph c) Simple Graph d) Complete Graph
20.TheZag-Zag Rotation in splay tree,every node moves two positions to the
8. Which of the following ways can be used to represent a graph? ( ) ___________from its current position.
a) Adjacency List and Adjacency Matrix b) Incidence Matrix
c) sparse Matrix d) No way to represent -o0o-
SUMATHI REDDY INSTITUTE OF TECHNOLOGY FOR WOMEN 8.What character shift tables does Boyer-Moore’s search algorithm use? ( )
II B.Tech. I Sem II Mid-Term Examinations, March/April-2023 a) good-character shift tables b) bad-character shift tables
DATASTRUCTURES
Objective Exam c) next-character shift tables d) both good and bad character shift tables
SET-IV
9. What is the worst case running time in searching phase of Boyer-Moore’s
Name: _________________________ H.T. No. ______________________________ algorithm? ( )
a) O(n) b) O(log n) c) O(m+n) d) O(mn)
I .Choose the correct answer
10. Procedure of sorting algorithms for larger records that does not fit in main
1.What is a time complexity for finding the longest palindromic substring in a string memory and are stored on disk is classified as ( )
by using the generalized suffix tree? ( ) a) parser sorting b).External sortingc)Internal sorting d).secondary sorting
a) Linear Time b) Exponential Time c) Logarithmic Time d) Cubic Time II. Fillin the blanks
2.What is a time complexity for finding the total length of all string on all edges of a
tree? ( ) 11.Inzig-zag rotation, every node moves one position to the
a) Ɵ (n) b) Ɵ (n!) c) Ɵ (1) d) O (n2) ________________followed by one position to the ___________________from its
current position
3.For what size of nodes, the worst case of usage of space in suffix tree seen? ( )
a) n Nodes b) 2n Nodes c) 2n nodes d) n! Nodes 12.In_____________, every node moves one position to the left followed by one
position to the right from its current position
4.An algorithm which tries all the possibilities unless results are satisfactory is and
generally is time consuming is ( ) 13.In splay tree ,before deleting the element, we first need to _______________that
element and then delete it from the root position
a) Brute Force b) Divide and Conquer
c) Dynamic programming algorithms d) None of the mentioned 14. In an AVL tree, the heights of the two child subtrees of any node differ by at
most_______________
5. Which is the simple sorting technique to sort a list of elements ( )
15. The term trie came from the word ____________________
a)Insertion sort b)selection sort c) Bubblesort d) none of the above
16. Prefix tree is known as _____________________
6.To perform the heap sort, you need to create a tree with all nodes greater than their
17. A trie searches the time complexity of a string depends upon the
( )
_________________the string
a) Sibling b)children c) parent d)root 18. In trie, every node except the root stores a ___________________ value
7. Which of the following algorithms formed the basis for the Quick search 19. In tries, if any two strings have a common prefix then they will have the
algorithm? ( ) ____________ ancestors
a) Boyer-Moore’s algorithm b) Parallel string matching algorithm
c) Binary Search algorithm d) Linear Search algorithm 20.TheZag-Zag Rotation in splay tree,every node moves two positions to the
___________from its current position
-o0o-
8. In a graph set of nodes are called as ()
SUMATHI REDDY INSTITUTE OF TECHNOLOGY FOR WOMEN
II B.Tech. I Sem II Mid-Term Examinations, March/April-2023 A. notes B. arrows C. vertices D. edges
DATASTRUCTURES
Objective Exam 9.What is the special property of red-black trees and what root should always be ()
SET-V
a) a color which is either red or black and root should always be black color only
Name: _________________________ H.T. No. ______________________________ b) height of the tree c) pointer to next node
I. Choose the correct answers d) a color which is either green or black
1. Finding the location of the element with a given value is: 10. What are splay trees? ()
a) self adjusting binary search trees b) self adjusting binary trees
a. Traversal b. Search c. Sortd.None of these c) a tree with strings d) a tree with probability
distributions
2.What data structure is used when converting an infix notation to prefix notation?
II.Fill in the blanks
a) Stackb) Queuec) B-Treesd) Linked-list
11.____________ is the process of visiting every node in a tree atleast once.
3.Disadvantage of using array representation for binary trees is?
12. In post order traversal, the root node is visited________________.
a) difficulty in knowing children nodes of a node
13. Children of the same parent are called ____________________.
b) difficult in finding the parent of a node
14. Nodes which are subtrees of another node are called _______________.
c) have to know the maximum number of nodes possible before creation of trees
15. In Binary Search Trees, the keys of all elements are __________________.
d) difficult to implement
16. If a node is a leaf node, then its left child and right child field are filled with
4.What must be the ideal size of array if the height of tree is ‘l’?
_____________.
a) 2l-1 b) l-1 c) ld) 2l
17. The process where two rotations are required to balance a tree is called
5. Which of the following an external sorting technique () _________________
A. Quick Sort B. Merge Sort C. Selection Sort D. Insertion Sort 18. When the height of the left subtree and right subtree of a node in an AVL Tree
are equal the balancing factor is _____________________.
6. The average depth of binary search tree is ( )
19. The __________________ of a vertex is the number of edges this vertex has that
A. o(n/2) B. o(n ) C .o(log n) D .o(n2) are connected to other vertices.
7. Comparisons in Brute-Force is () 20. The weight or value of an edge is also called ___________________.
A. from middle B. start to middle C. left to right D. right to left -o0o-