An algorithm that always takes the same amount of time to process, regardless of the size of the input, has a time complexity of _______.

  • O(1)
  • O(log?n)
  • O(n)
  • O(n^2)
An algorithm with a time complexity of O(1) has a constant time of execution, meaning it always takes the same amount of time, regardless of the input size. This is the most efficient time complexity.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *