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

1) Elements can be retrieved by index in …………….?
  1. linked lists
  2. linear arrays
  3. both of above
  4. none of above

Answer: 2

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

Answer: 2

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

Explanation: Quick sort, Heap sort and Shell sort all have best case time complexity as O(n log n) 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

Answer: 1

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

Answer: 4

Related Posts