Data structure MCQ Set-3

1. Two main measures for the efficiency of an algorithm are
  • Processor and memory
  • Complexity and capacity
  • Time and space
  • Data and space
2. The time factor when determining the efficiency of algorithm is measured by
  • Counting microseconds
  • Counting the number of key operations
  • Counting the number of statements
  • Counting the kilobytes of algorithm
3. The space factor when determining the efficiency of algorithm is measured by
  • Counting the maximum memory needed by the algorithm
  • Counting the minimum memory needed by the algorithm
  • Counting the average memory needed by the algorithm
  • Counting the maximum disk space needed by the algorithm
4. Which of the following case does not exist in complexity theory
  •  Best case
  • Worst case
  • Average case
  • Null case
5. The Worst case occur in linear search algorithm when
  • Item is somewhere in the middle of the array
  • Item is not in the array at all
  • Item is the last element in the array
  • Item is the last element in the array or is not there at all
6. The Average case occur in linear search algorithm
  • When Item is somewhere in the middle of the array
  • When Item is not in the array at all
  • When Item is the last element in the array
  • When Item is the last element in the array or is not there at all
7. The complexity of the average case of an algorithm is
  • Much more complicated to analyze than that of worst case
  • Much more simpler to analyze than that of worst case
  • Sometimes more complicated and some other times simpler than that of worst case
  • None or above
8. The complexity of linear search algorithm is
  • O(n)
  • O(log n)
  • O(n^2)
  • O(n log n)
9. The complexity of Binary search algorithm is
  •  O(n)
  • O(log )
  • O(n^2)
  • O(n log n)
10. The complexity of Bubble sort algorithm is
  • O(n)
  • O(log n)
  • O(n^2)
  • O(n log n)