Professional Documents
Culture Documents
Question Bank - Data Structures
Question Bank - Data Structures
Question Bank - Data Structures
4. What can be said about the array representation of a circular queue when it
contains only one element ?
a) Front = Rear = Null b) Front = Rear + 1
c) Front = Rear – 1 d) Front = Rear
c)Both d) None
5. The situation when PTR-> NEXT = START in a circular linked list, means
a) PTR is at the first node in the linked list
b) PTR is at the last but one node in the linked list
c) PTR is at the last node in the linked list
d) PTR is at the middle node in the linked list
6. How many files are contained in each node in Doubly linked list
a) atmost 2 b) atleast 3
c) exactly 2 d) none of the above
8.In circularly linked list organization, insertion of record involves the modification of
a) No pointer b) 1 pointer c) 2 pointers d) 3 pointers
9.The linear list of element in which delete can be done from one end and insertion can
takes place only at the other end is known as ___________
a) Queue b) Stack c) Tree d) Graph
a) 0 b) 1 c) 2 d) 3
5. In the worst case, a binary search tree will take how much time to search
an elements ?
a) O(n) b) O(log n) c) O(n2) d) O(n log n)
6. A complete binary tree of level 5 (considering root at level 1) has how many nodes?
a) 63 b) 31 c) 15 d) 32
11. The number of edges from the root to the node is called _________ of the tree.
a) Height b) Depth c) Length d) None of the mentioned
12. What is the time complexity for finding the height of the binary tree ?
a) h = O(loglogn) b) h = O(nlogn) c) h = O(n) d) h = O(log n)
13. What are null nodes filled with in a threaded binary tree?
a) in order predecessor for left node and inorder successor for right node information
b) right node with inorder predecessor and left node with inorder successor information
c) they remain null
d) some other values randomly
15.The length of the longest path from root to any node is known as ___________
a) Length of Tree b) Width of Tree c) Depth of Tree d) None of above
3.Consider B+ tree in which the search key is 12 bytes long, block size is1024 bytes, record
pointer is 10 bytes long and block pointer is 8 bytes long. The
maximum number of keys that can be accommodated in each “non-leaf node” of
the tree is
a) 49 b) 50 c) 51 d) 52
1.How much time does an AVL tree take to perform search, insert, and delete operations in the
average case as well as the worst case?
a)O(n) b) O(log n) c) O(n2) d) O(n log n)
2. If we draw an AVL tree using following elements 50, 45, 80, 95, 26, 43, 105,.
What will be balance factor of node 43 in finally produced AVL tree ?
a)0 b) –1 c) +2 d) +1
3.In AVL tree the __________ of node is the height of its left subtree minus the height of its
right subtree.
a) Ordering b) Balanced factor
c) Cardinality d) Multiplicity
4. Why we need to a binary tree which is height balanced ?
a) to avoid formation of skew trees b) to save memory
c) to attain faster memory access d) to simplify storing
5. Given an empty AVL tree, how would you construct AVL tree when a set of numbers are
given without performing any rotations ?
a) just build the tree with the given input
b) find the median of the set of elements given, make it as root and construct the tree
c) use trial and error
d) use dynamic programming to build the tree
7. In AVL tree the ___________ of node is the height of its left subtree minus the height of
its right subtree.
a) Ordering b) Balanced factor
c) Cardinality d) Multiplicity
8. For an AVL tree, if balance factor of any node is 3 then corresponding AVL tree will be
called as
a) Three way tree b) Unbalanced AVL tree
c) 2-3 tree d) Tree-way balanced tree
6. What sequence would the BFS traversal of the given graph yield ?
a) A F D B C E b) C B A F D c) A B D C F d) F D C B A
a) Stack b) Queue