Data Structure MCQ Questions and Answers

11. Linked list data structure offers considerable saving in:

  1. Computational Time
  2. Space Utilization
  3. Space Utilization and Computational Time
  4. Speed Utilization

Answer : C
Explanation: Space Utilization and Computational Time. Using linked list saves both space and time. So, option C is correct.

12. In a circular linked list

  1. There is no beginning and no end
  2. Components are all linked together in some sequential manner
  3. Forward and backward traversal within the list is permitted
  4. Components are arranged hierarchically

Answer : A
Explanation: As it’s name suggests, in a circular linked list, there is no beginning and no end because its circular.So, Option A is correct.

13. Which one of the following is an application of Stack Data Structure?

  1. Managing function calls
  2. The stock span problem
  3. Arithmetic expression evaluation
  4. All of the mentioned

Answer : D
Explanation: All of the mentioned.

14. Which of the following statements about linked list data structure is/are TRUE?

  1. Addition and deletion of an item to or from the linked list require modification of the existing pointers
  2. The linked list pointers do not provide an efficient way to search an item in the linked list
  3. Linked list pointers always maintain the list in ascending order
  4. The linked list data structure provides an efficient way to find kth element in the list

Answer : B
Explanation: The linked list pointers do not provide an efficient way to search an item in the linked list.

15. Which of the following is true about linked list implementation of queue?

  1. In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end
  2. In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from end
  3. In push operation, if new nodes are inserted at the beginning, then in pop operation, nodes must be removed from the beginning
  4. In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from beginning

Answer : A
Explanation: In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end. So, option A is correct.

16. Which of the following is not the correct statement for a stack data structure?

  1. Elements are stored in a sequential manner
  2. Top of the stack contains the last inserted element
  3. Arrays can be used to implement the stack
  4. Stack follows FIFO

Answer : D
Explanation: Stack follows FIFI (First in first out) is not the correct statement because stack follows LIFO (Last in first out).

17. Which one of the following is an application of Queue Data Structure?

  1. When a resource is shared among multiple consumers
  2. Load Balancing
  3. When data is transferred asynchronously (data not necessarily received at same rate as sent) between two processes
  4. All of the above

Answer : D
Explanation: All of the above are application of Queue data structure. So, option D is correct.

18. Arrays are best data structures for

  1. For the size of the structure and the data in the structure are constantly changing
  2. For relatively permanent collections of data
  3. For both of above situation
  4. For none of the above

Answer : B
Explanation: Arrays are best data structures for relatively permanent collections of data.

19. The disadvantage in using a circular linked list is

  1. It is possible to get into infinite loop
  2. Last node points to first node
  3. Time consuming
  4. None of these

Answer : A
Explanation: The disadvantage in using a circular linked list is that it is possible to get into infinite loop.

20. How many swaps are required to sort the given array using bubble sort – { 2, 5, 1, 3, 4}

  1. 4
  2. 6
  3. 8
  4. 5

Answer : A
Explanation: Total 4 as there will be 3 swaps in first iteration and 1 swap in second iteration. SO, option A is correct.

This Post Has One Comment

Leave a Reply