Space and Time Complexity MCQs

Space and Time Complexity MCQs

Space and Time Complexity MCQs

  1. BigO notation of Time complexity of an algorithm is used when:
  2. (a) Describes limiting behaviour of the function
    (b) Characterises a function based on growth of function
    (c) Upper bound on growth rate of the function
    (d) All of the mentioned

    (d) All of the mentioned

  3. Algorithm time complexity is O(n). What is indicated by O(n)?
  4. (a) constant
    (b) linear
    (c) exponential
    (d) none of the mentioned

    (b) linear

  5. Algorithm time complexity is O(1). What is indicated by O(1)?
  6. (a) Constant
    (b) polynomial
    (c) exponential
    (d) none of the mentioned

    (a) Constant

  7. Space complexity of an algorithm is the maximum amount of_______ required by it during execution.
  8. (a) Time
    (b) Operations
    (c) Memory space
    (d) None of the above

    (c) Memory space

  9. The memory space required by an algorithm is depends on size of input.
  10. (a) True
    (b) False
    (c) May be
    (d) None

    (a) True

  11. Analysis of algorithms mainly depends on which factors?
  12. (a) Text Analysis
    (b) Growth factor
    (c) Time
    (d) None of the above

    (b) Growth factor

  13. To verify whether a function grows faster or slower than the other function, wve have some asymptotic or mathematical notations, which is _______.
  14. (a) Big Omega(f)
    (b) Big Theta (f)
    (c) Big Oh O (f)
    (d) All of the above

    (d) All of the above

  15. Big Oh Onotation indicate:
  16. (a) Worst Time
    (b) Average Time
    (c) Best Time
    (d) None

    (a) Worst Time

  17. Big Omega 0 notation indicate
  18. (a) Worst Time
    (b) Average Time
    (c) Best Time
    (d) None

    (c) Best Time

  19. Big Theta notation indicate:
  20. (a) Worst Time
    (b) Average Time
    (c) Best Time
    (d) None

    (b) Average Time

  21. If for an algorithm time complexity is given by O(log2n) then complexity will be ___________.
  22. (a) constant
    (b) polynomial
    (c) exponential
    (d) none of the mentioned

    (d) none of the mentioned

  23. If for an algorithm time complexity is given by O(1) then what is the complexity of it?
  24. (a) constant
    (b) polynomial
    (c) exponential
    (d) none of the mentioned

    (a) constant

  25. which of the following case does not exist in complexity theory?
  26. (a) Best Case
    (b) Worst Case
    (c) Average Case
    (d) Null Case

    (d) Null Case

  27. the complexity of bubble sort algorithm is ________.
  28. (a) O(n)
    (b) O (n2)
    (c) O(n log n)
    (d) None of the above

    (b) O (n2)

  29. the worst case occur in linear search algorithm when
  30. (a) Item is somewhere in the middle of the array
    (b) Item is not in the array at all
    (c) Item is the last element in the array
    (d) Item is the last element in the array or is not there at all

    (d) Item is the last element in the array or is not there at all

  31. the complexity of the average case of an algorithm is
  32. (a) Much more complicated to analyze than that of worst case
    (b) Much more simpler to analyze than that of worst case
    (c) Sometimes more complicated and some other times simpler than that of worst case
    (d) None or above

    (a) Much more complicated to analyze than that of worst case

  33. the time factor when determining the efficiency of algorithm is measured by
  34. (a) Counting microseconds
    (b) Counting the number of key operations
    (c) Counting the number of statements
    (d) Counting the kilobytes of algorithm

    (b) Counting the number of key operations

  35. two important measures to find the efficiency of an algorithm are
  36. (a) processor and memory
    (b) complexity and capacity
    (c) time and space
    (d) data and space

    (b) complexity and capacity

  37. The concept of order (Big O) is important because
  38. (a) It can be used to decide the best algorithm that solves a given problem
    (b) It determines the maximum size of a problem that can be solved in a given system, in a given amount of time
    (c) all of the above
    (d) none of these

    (c) all of the above

  39. the space factor when determining the efficiency of algorithm is measured by
  40. (a) Counting the maximum memory needed by the algorithm
    (b) Counting the minimum memory needed by the algorithm
    (c) Counting the average memory needed by the algorithm
    (d) Counting the maximum disk space needed by the algorithm

    (b) Counting the minimum memory needed by the algorithm

  41. complexity of linear search algorithm is
  42. (a) O(n)
    (b) n
    (c) None
    (d) Both a and b

    (a) O(n)

  43. linear search time complexity average case
  44. (a) O(N)
    (b) N
    (c) None
    (d) nlogn

    (a) O(N)

Space and Time Complexity MCQs
Related Topics

"space and time complexity mcqs","time complexity of algorithms mcqs","Space and Time Complexity MCQs","space complexity of alogrithm mcqs,time complexity mcqs","time and space complexity","Data Structures and Algorithms Multiple choice Questions","The time and space complexity mcqs","Time complexity of code mcqs"

1 Comments

To be published, comments must be reviewed by the administrator.

Post a Comment

To be published, comments must be reviewed by the administrator.

Previous Post Next Post