time complexity of an algorithm/ big-O-Notation

  1. O(1) Constant Time: An algorithm is said to run in constant time if it requires the same amount of time regardless of the input size.
  2. O(n) Linear Time: An algorithm is said to run in linear time if its time execution is directly proportional to the input size, i.e. time grows linearly as input size increases.
  3. O(log(n)) Logarithmic Time: An algorithm is said to run in logarithmic time if its time execution is proportional to the logarithm of the input size.
  4. O(n2) Quadratic Time: An algorithm is said to run in quadratic time if its time execution is proportional to the square of the input size.
  5. O(exp(n)) Exponential Time:
Big O Cheat Sheet Career Baba
Share itShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Leave a Reply

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