• Data Structure Reference

• Other Reference

# MCQ On Complexity Algorithms - Data Structure

21. if for an algorithm time complexity is given by O(n2) then complexity will:

A. constant
B. quardratic
C. exponential
D. none of the mentioned

22. If for an algorithm time complexity is given by O((3/2)^n) then complexity will:

A. constant
B. quardratic
C. exponential
D. none of the mentioned

23. the time complexity of binary search is given by:

A. constant
B. quardratic
C. exponential
D. none of the mentioned

24. The time complexity of linear search is given by:

A. O(log2n)
B. O(1)
C. exponential
D. none of the mentioned

25. Which algorithm is better for sorting between bubble sort and quicksort?

A. bubble sort
B. quick sort
C. both are equally good
D. none of the mentioned

26. State true or false
Time complexity of binary search algorithm is constant

A. True
B. False

27. Two main measures for the efficiency of an algorithm are

A. Time and space
B. Processor and memory
C. Complexity and capacity
D. Data and space

28. Which is the best data structure for round robin algorithm for CPU scheduling?

A. Stack implemented using queues
C. Circular queue
D. Queue implemented using stacks

29. Which algorithm is having highest space complexity?

A. Bubble sort
B. Insertion Sort
C. Quick Sort
D. Merge Sort

30. If the array is already sorted, then the running time for merge sort is: ?

A. O(1)
B. O(n*log n)
C. O(n)
D. O(n^2)