MCQ on Stack | Queue | Array | Linked List Data Structures

(Last Updated On: March 28, 2018)
1) Elements can be retrieved by index in …………….?
  1. linked lists
  2. linear arrays
  3. both of above
  4. none of above
View Answer
Answer: B

 

2) Efficiency of an algorithm is measured by
  1. Time and Capacity complexity
  2. Time and Space complexity
  3. Speed  and Space complexity
  4. Speed  and Capacity complexity
View Answer
Answer: B

3) Which sorting algorithm is the slowest algorithm for large number of data?
  1. Quick sort
  2. Heap sort
  3. Bubble sort
  4. Shell sort
View Answer
Answer:C
Explanation:Quick sort, Heap sort and Shell sort all have best case time complexity as O(nlogn) and Bubble sort has time complexity of O(n2).
So, Bubble sort is slowest.

4) Retrieval operation is fastest in which data structure
  1. Heap
  2. Stack
  3. Linked list
  4. None
View Answer
Answer:A

5) State True or False about array and linked list

I. Retrieval of element will be faster in array than link list?
II. Search operation in both array and link list are leaner.

  1. True, False
  2. False, True
  3. False, False
  4. True, True
View Answer
Answer:D