11. Linked list data structure offers considerable saving in:
- Computational Time
- Space Utilization
- Space Utilization and Computational Time
- 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
- There is no beginning and no end
- Components are all linked together in some sequential manner
- Forward and backward traversal within the list is permitted
- 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?
- Managing function calls
- The stock span problem
- Arithmetic expression evaluation
- 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?
- Addition and deletion of an item to or from the linked list require modification of the existing pointers
- The linked list pointers do not provide an efficient way to search an item in the linked list
- Linked list pointers always maintain the list in ascending order
- 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?
- In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end
- In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from end
- In push operation, if new nodes are inserted at the beginning, then in pop operation, nodes must be removed from the beginning
- 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?
- Elements are stored in a sequential manner
- Top of the stack contains the last inserted element
- Arrays can be used to implement the stack
- 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?
- When a resource is shared among multiple consumers
- Load Balancing
- When data is transferred asynchronously (data not necessarily received at same rate as sent) between two processes
- 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
- For the size of the structure and the data in the structure are constantly changing
- For relatively permanent collections of data
- For both of above situation
- 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
- It is possible to get into infinite loop
- Last node points to first node
- Time consuming
- 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}
- 4
- 6
- 8
- 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.
Pingback: JavaScript MCQ Questions and Answers - cozmocard