Introduction to Big O Notation

Big O notation is used to describe the time or space complexity of algorithms. Big-O is a way to express an upper bound of an algorithm’s time or space complexity.

  • Describes the asymptotic behavior (order of growth of time or space in terms of input size) of a function, not its exact value.
  • Can be used to compare the efficiency of different algorithms or data structures.
  • It provides an upper limit on the time taken by an algorithm in terms of the size of the input. We mainly consider the worst case scenario of the algorithm to find its time complexity in terms of Big O

Comments