If an algorithm performs exactly 100 operations regardless of input size N, what is its asymptotic time complexity?

Options

  • A. O(1)
  • B. O(N)
  • C. O(log N)
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. O(1)

Detailed Explanation

An algorithm whose number of operations remains constant regardless of the input size has O(1), or constant, time complexity. For example, accessing an array element by index is generally O(1). Whether the array contains 10 elements or one million elements does not change the number of basic operations required for direct index access. Constant complexity is asymptotically more efficient than logarithmic, linear, or quadratic growth.