Data Structures NPTEL Exam Answers 2021

Data Structures NPTEL Exam >> Complete Questions and Answers of Data Structure NPTEL Course

Please Note: We tried our best to maintain this site updated to our customers for free. You may even contribute by upgrading brand new questions or present question-answers. You’ll find several questions on our site; it isn’t easy for all of us to assess them regularly. It’s going to be great when you will help us to upgrade the website. Discuss the same Answer submit or page or contact page. We’ll attempt to upgrade the question/answer immediately.


  1. Term Data Structure refers to _________ and interrelationship between them.
  2. Data is nothing but ____________
  3. In what kind of storage we can easily insert,delete,concatenate and rearrange sub strings ?
  4. ADT is called as Abstract because 
  5. If elements of the data structure forms a sequence of list then it is called as ____________
  6. The smallest element of an array’s index is called its
  7. In a circular linked list .
  8.  A linear collection of data elements where the linear node is given by means of pointer is
  9. A linear list in which the pointer points only to the successive node is ________
  10. Linked lists are best suited _______
  11. User push 1 element in the stack having already five elements and having stack size as 5 then stack becomes ___________.
  12. In the stack, If user try to remove element from the empty stack then it called as _______
  13. Process of removing element from the stack is called as _______.
  14. In the stack process of inserting an element in the stack is called as ___________.
  15. Stack in data structure is _________.
  16. Instack,Insertion and deletion can be done only at the_____ element
  17. What data structure is used to perform recursion?
  18. What is the type of the algorithm used in solving the 8 Queens problem?
  19. What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?
  20. Which of the following statement(s) about stack data structure is/are NOT correct?
  21. A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as a ?
  22. The data structure required for Breadth First Search  on a graph is?
  23. A queue is a ?
  24. In linked list implementation of a queue, where does a new element be inserted?
  25. A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?
  26. In linked list implementation of a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into a NONEMPTY queue?
  27. A normal queue, if implemented using an array of size MAX_SIZE, gets full when
  28. A variant of the linked list in which none of the node contains NULL pointer is?
  29. In circular linked list, insertion of node requires modification of?
  30. In Binary trees nodes with no successor are called _________ .
  31. A connected graph T without any cycles is called a ……..
  32. Sequential representation of binary tree uses ……..
  33. A binary tree whose every node has either zero or two children is called …….
  34. Which indicates pre-order traversal?
  35. A BST is traversed in the following order recursively: Right, root, leftThe output sequence will be in
  36. In order to get the contents of a Binary search tree in ascending order, one has to traverse it in
  37. In order to get the information stored in a Binary Search Tree in the descending order, one should traverse it in which of the following order?
  38. What is the worst case time complexity for search, insert and delete operations in a general Binary Search Tree?
  39. Which of the following traversal outputs the data in sorted order in a BST?
  40. What is common in three different types of traversals (Inorder, Preorder and Postorder)?
  41. The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g, respectively. The postorder traversal of the binary tree is:
  42. Which of the following pairs of traversals is not sufficient to build a binary tree from the given traversals?
  43. Which traversal of tree resembles the breadth first search of the graph?
  44. Which of the following tree traversal uses a queue data structure?
  45. What is the expected time required to search for a value in a binary search tree containing n nodes? (You should make reasonable assumptions about the structure of the tree.)
  46. If node N is a terminal node in a binary tree then its ………
  47. In threaded binary tree ……… points to higher nodes in tree.
  48. In linked representation of Binary trees LEFT[k] contains the _____ of at the node N, where k is the location.
  49. The post order traversal of a binary tree is DEBFCA. Find out the pre order Traversal.
  50. The height of a BST is given as h. Consider the height of the tree as the no. of edges in the longest path from root to the leaf. The maximum no. of nodes possible in the tree is?
  51. Suppose we have numbers between 1 and 1000 in a binary search tree and want to search for the number 363. Which of the following sequence could not be the sequence of the node examined?
  52. Which type of traversal of binary search tree outputs the value in sorted order?
  53. A binary search tree is formed from the sequence 6, 9, 1, 2, 7, 14, 12, 3, 8, 18. The minimum number of nodes required to be added in to this tree to form an extended binary tree is?
  54. When a binary tree is converted in to an extended binary tree, all the nodes of a binary tree in the external node becomes
  55. The maximum number of elements in a heap of height h is
  56. In a full binary tree, every internal node has exactly two children. A full binary tree with 2n+1 nodes contains
  57. To represent hierarchical relationship between elements, Which data structure is suitable?
  58. In BST operations-______ must not leave ‘a gap’ in the tree.
  59. AVL trees have a faster _______________
  60. In ______________ tree, the heights of two child sub tree of any node differ by at most one
  61. Items 7,3,11,9 and 13 are inserted into an AVL tree. What happens when 12 is inserted?
  62. A binary search tree whose left sub tree and right sub tree differ in hight by at most 1 unit is called ……
  63. The balance factor for an AVL tree is either
  64. AVL trees have LL, LR, RR, RL rotations to balance the tree to maintain the balance factor  (LR : Insert node in Right sub tree of Left sub tree of node A,        etc). Among rotations the following are single and double rotations
  65. Which of the following is not possible as a balance factor of any node of an AVL tree?
  66. What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm?
  67. An AVL delete is similar to a regular ______ tree delete.
  68. What maximum difference in heights between the leafs of a AVL tree is possible?
  69. In AVL tree delete ________ children is used to replace it with null.
  70. In AVL tree delete to delete will require you to go all the way back to the looking for imbalances.
  71. For each node X encountered, check if heights of left(x) and right(x) differ by atmost ____.
  72. Rotations in deletion have ______ cases for single rotations.
  73. Which of the following concepts make extensive use of arrays?
  74. In linked list each node contain minimum of two fields. One field is data field to store the data second field is?
  75. The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?
  76. The data structure required to check whether an expression contains balanced parenthesis is?
  77. The process of accessing data stored in a serial access memory is similar to manipulating data on a ________
  78. What does ‘stack underflow’ refer to?
  79. What is the time complexity of pop () operation when the stack is implemented using an array?
  80. If we have a tree of n nodes, how many edges will it have?
  81. Which of the following data structures can handle updates and queries in log(n) time on an array?
  82. Of the following data structures, which has a Last in First Out ordering? In other words, the one that came in last will be the first to be popped.
  83. What is the complexity of searching for a particular element in a Singly Linked List?
  84. Which of the following statements are correct with respect to Singly Linked List(SLL) and Doubly Linked List(DLL)?
  85. Minimum number of queues to implement stack is ___________
  86. What is the term for inserting into a full queue known as?
  87. What is the need for a circular queue?
  88. You are asked to perform a queue operation using a stack. Assume the size of the stack is some value ‘n’ and there are ‘m’ number of variables in this stack. The time complexity of performing dequeue operation is (Using only stack operations like push and pop)(Tightly bound)
  89. What is a dequeue?
  90. What is the time complexity of deleting from the rear end of the dequeue implemented with a singly linked list?
  91. What are the number of nodes of left and right subtree of the binary tree if the data is inserted in the following order: 45, 15, 8, 5 6, 5,65, 47, 12, 18, 10, 73, 50, 16, 61
  92. The worst case time complexity of AVL tree is better in comparison to binary search tree for
  93. A full binary tree with 2n+1 nodes contain
  94. If a node in a BST has two children, then its inorder predecessor has
  95. A full binary tree with n leaves contains
  96. One can convert a binary tree into its mirror image by traversing it in
  97. The number of leaf nodes in a complete binary tree of depth d is
  98. B Trees are generally
  99. What is the maximum possible number of nodes in a binary tree at level 6?
  100. Can a tree stored in an array using either one of inorder or post order or pre order traversals be again reformed?
  101. A full binary tree with 2n+1 nodes contain
  102. A binary tree whose every node has either zero or two children is called
  103. The degree of a vertices is the number of _______ to that vertex.
  104. A simple path is a path such that all vertices are _____.
  105. A ______ is a path that starts and ends at the same point.
  106. In undirected graph adjacency matrix is _______.
  107. A graph with numbers assigned to its edges is ______.
  108. Dynamic programming reduces ___________.
  109. Travelling salesman problem is an example of _________.
  110. A connected sub graph that connects all the vertices of the original connected graph is called _______.
  111. Prim’s algorithm follows a _______ approach to find a minimum spanning tree.
  112. ________ is defined as the shortest distance between source and destination.
  113. A complete binary tree can be stored as an array using _______ traversal.
  114. The accessing of location of elements in a heap is _______.
  115. Heap and ________ are considered to be synonyms of each other.
  116. Insertion into a heap can be done in ________ time.
  117. An empty heap is said to be in a state of ________.
  118. The heap is represented in the _______ data structure?
  119. The heap sort can be done in the order of ________ time?
  120. You reserve the heap property the ______ should always be less then the parent nodes?
  121. In heap we are removing the elements in the zero position and swapping it at the _____ position.
  122. The output that will be the maximum element and then you reheapify this between _______.
  123.  ________ time to initialize hash table(b is the number of positions in hash table)
  124. ________ time to perform insert,remove and search.
  125. __________ is a method of collision resolution in hash tables.
  126. A _______ is an alternative method for representing a dictionary.
  127. ________ are the methods to deal with collision.
  128. Bubble sort, selection sort and insertion sort are all _______.
  129. The average time complexity of inserting sorting is ________
  130. Space complexity for bubble sort is ______.
  131. The worst time complexity for insertion sorting is _______.
  132. Which of the following is an external sorting?
  133. Based on which concept priority queue is done?
  134. Insert elements in a priority queue implemented with an unsorted sequence is done in ____.
  135. Insert elements in a priority queue implemented with sorted sequence is done in ____.
  136. Very slow way of sorting is ______.
  137. Which of the following sorting algorithm is of divide and conquer type?
  138. Brute force is a ______.
  139. In selection sort scan the array to find its ____ and swap it with the first element.
  140. _______ finds the minimum.
  141. Selection sort ______ smallest element with the value in the first position.
  142. The best, average and worst case time complexities of the selection sort.
  143. Bubble sort follows which method?
  144. Running time of bubble sort algorithm is _____.
  145. Bubble sort is also called as ________.
  146. Running time for both best case and worst case of bubble sort algorithm are _____.
  147. Worst case of bubble sort algorithm is nothing but  _______.
  148. An adjacency matrix representation of a graph cannot contain information of :
  149. In Breadth First Search of Graph, which of the following data structure is used?
  150. For an undirected graph G with n vertices and e edges, the sum of the degrees of each vertex is
  151. What is the number of edges present in a complete graph having n vertices?
  152. A connected planar graph having 6 vertices, 7 edges contains _____________ regions.
  153. Which of the following properties does a simple graph not hold?
  154. What is the maximum number of edges in a bipartite graph having 10 vertices?
  155. In a max-heap, element with the greatest key is always in which node?
  156. Heap can be used as ________________
  157. Hash tree is generalization of ______
  158. Which of the following is a widely used form of the hash tree?
  159. Where is the hash tree used?
  160. Which of the following algorithmic paradigm is used in the merge sort?
  161. Hash tree is also known as _____
  162. What sorting algorithms have their best and worst case times equal?
  163. A technique for direct search is
  164. A sort which relatively passes through a list to exchange the first element with any element less than it and then repeats with a new first element is called
  165. The total number of companions required to merge 4 sorted files containing 15, 3, 9 and 8 records into a single sorted file is
  166. If several elements competing for the same bucket in the hash table,what is it called?
  167. The number of interchanges required to sort 5, 1, 6, 2 4 in ascending order using 
  168. A characteristic of the data that binary search uses but the linear search ignores is the___________.
  169. In order to get the contents of a Binary search tree in ascending order, one has to traverse it in
  170. The worst-case time for binary search to find out a single item in an array is in _________________ ?
  171. The Worst case occur in linear search algorithm when
  172. All the above Which of the following is not the required condition for binary search algorithm
  173. The following sorting algorithm is of divide and conquer type
  174. The in-order traversal of tree will yield a sorted listing of elements of tree in ________________.
  175. The number of swappings needed to short the numbers 8, 22, 7, 9, 31, 19, 5, 13 in ascending order using bubble sort is
  176. Quick sort uses?
  177. Two main measures for the efficiency of an algorithm are _____.
  178. The complexity of bubble sort algorithm is ______.
  179. If we were sorting entries according to keys, then each bucket is a _______.
  180. Sorting algorithm can be characterized as ______.
  181. Radix and ______ do not work well when keys are very long.
  182. ______ works as long as the Bucket sort stages are stable sorts.
  183. Radix sort is ____ of bucket sort.
  184. Radix-sort perform the bucket sorts by ______.
  185. Radix and bucket sorts are ______.
  186. First implementation of merge sort was on the ENIAC in the year _______.
  187. _______ is a method of algorithm design.
  188. Merge sort has _______ running time
  189. _______ is a sorting algorithm based on the divide-and-conquer paradigm.
  190. The best case for the recursion are sub problems of size _____.
  191. What is the advantage of bubble sort over other sorting techniques?
  192. For merging two sorted lists of size m and n into sorted list of size m+n, we require comparisons of
  193. What is the best case complexity of QuickSort?
  194. The given array is arr = {2,3,4,1,6}. What are the pivots that are returned as a result of subsequent partitioning?
  195. In addition to the pancake sorting problem, there is the case of the burnt pancake problem in which we are dealing with pancakes (discs) that are burnt on                one side only. In this case it is taken that the burnt side must always end up _______
  196. Which of the following is not a stable sorting algorithm?
  197. Which of the following is a stable sorting algorithm?
  198. Which of the following is not an in-place sorting algorithm?
  199. Running merge sort on an array of size n which is already sorted is
  200. What would be the worst case time complexity of the insertion sort algorithm, if the inputs are restricted to permutation of 1…..n with at most n inversion?
  201. Which of the following is not a non-comparison sort?
  202. The time complexity of heap sort in worst case is
  203. If the given input array is sorted or nearly sorted, which of the following algorithm gives the best performance?
  204. Which of the following algorithm pays the least attention to the ordering of the elements in the input list?
  205. Consider the situation in which assignment operation is very costly. Which of the following sorting algorithm should be performed so that the number of      assignment operations is minimized in general?
  206. Time complexity of bubble sort in best case is
  207. Given a number of elements in the range [0….n3]. Which of the following sorting algorithms can sort them in O(n) time?
  208. Which of the following algorithms has lowest worst case time complexity?
  209. Which of the following sorting algorithms is/are stable
  210. Counting sort performs …………. Numbers of comparisons between input elements.
  211. The running time of radix sort on an array of n integers in the range [0……..n5 -1] when using base 10 representation is
  212. The running time of radix sort on an array of n integers in the range [0……..n5 -1] when using base n representation is
  213. Which of the following sorting algorithm is in-place
  214. The radix sort does not work correctly if each individual digit is sorted using
  215. Which of the following sorting algorithm has the running time that is least dependant on the initial ordering of the input?
  216. Time complexity to sort elements of binary search tree is
  217. The lower bound on the number of comparisons performed by comparison-based sorting algorithm is 
  218. Which of the following algorithm(s) can be used to sort n integers in range [1…..n3] in O(n) time?
  219. Which of the following algorithm design technique is used in the quick sort algorithm?
  220. Merge sort uses
  221. Disks are divided into logical units called _______.
  222. The extension of executable file types is _______.
  223. The extension of object file types is ________.
  224. What is Unicode?
  225. Which of the following device cannot be shared in network?
  226. All files involved in updating are sorted based on ________.
  227. In updating  a sequential file New master file becomes __________.
  228. To make the updating process __________, all files are sorted on the same key.
  229. Disks can store ________ of characters.
  230. Secondary key fields should follow ______ fields in a record.
  231. External sorting algorithms makes _______ accesses to a storage device.
  232. Sorting is used to eliminate _________ in the collection of data
  233. The cost of accessing data is significantly ______ either bookkeeping or comparison costs.
  234. During 2nd pass of two-way merge sort  in each pass the number of strings is reduced by ________ of  the number.
  235. During 2nd pass of two-way merge sort in each pass the sizes of the strings are ______
  236. Cascade merge allow _______ way merge with only t tape units.
  237. _______ sort is the most efficient in terms of speed and utilisation of resources.
  238. Polyphase merge in each pass performs only ____ way merge.
  239.  ________ merge sort minimizes disk I/O cost.
  240. Which of the following is an external sorting?
  241. A sequence set is a set of _____.
  242. A blocked file takes up ______ space than an unblocked file because of internal fragmentation.
  243. Sequential representation of binary tree uses _________
  244. A binary tree whose every node has either zero or two children is called ______
  245. The depth of complete binary tree is given by ______
  246.  Number of records that can be stored in a B+ tree is __________.
  247. The maximum number of keys in a record is called the ______ of the B+ tree.
  248. The minimum number of keys per record is _____ of the maximum number of keys.
  249. Linked representation of binary tree needs _____ parallel arrays.
  250. In Binary trees nodes with no successor are called _______
  251. B+ tree contains __________
  252. Order is the _____ number of keys/pointers in a non-leaf node.
  253. ________ is the number pointers out of the node.
  254. B+ tree consist of a ______.
  255. A tree in which the value in every node is more than node-values in its left subtree and less than node-values in its right subtree.
  256. This Algorithm scans the lists by swapping the entries whenever pair of adjacent keys are out of desired order.
  257. The main characteristics of a good algorithm are ________
  258. Which of these is the time complexity involved in building a heap of n elements and cannot be expressed in lower order terms?
  259. For an algorithm the complexity of the average case is 
  260. ________ sorting is much less efficient on large lists.
  261. ________ is  a good choice for sorting lists of a few thousand items or less.
  262. The disadvantage of insertion sort is _________.
  263. The advantages of insertion sorting are ________.
  264. A tree is also known as _______ sort.
  265. An optimal quick sort is ________ ?
  266. If the input is random, then we can choose the key in position _______ as pivot.
  267. The main idea is to find the _____ position for the pivot element P.
  268. Best case is _____ same as merge sort.
  269. Worst case is ________.
  270. Quick sort is used to ______.
  271. First step in quick sort is _______.
  272. The  _________ are stored in the original data array.
  273. Partitioning loops through, _______ elements below/above pivot.
  274. Partition splits array in two sub-arrays of size ______.
  275. Prims algorithm start at a source vertex and grow a ______.
  276. _______ finds a minimum cost spanning tree by selecting edges from the graph.
  277. In prims algorithm process is repeated until a ____ is formed.
  278. In _______ operations method incident edges is called once for each vertex.
  279. From the following choose the one which belongs to the algorithm paradigm other     than to which others from the following belongs to.
  280. A “safe edge” is an edge of ____ which does not create a cycle.
  281. Kruskal’s algorithm also finds the minimum cost spanning tree of a _____ by adding edges.
  282. We need a data structure that maintains a _______.
  283. Is kruskal algorithm is whether than prim’s algorithm?
  284. What algorithmic technique does the kruskal algorithm follows?