Polynomial time and exponential time

Below are some common Big-O functions while analyzing algorithms.

  • O(1) – constant time
  • O(log(n)) – logarithmic time
  • O((log(n))c) – polylogarithmic time
  • O(n) – linear time
  • O(n2) – quadratic time
  • O(nc) – polynomial time
  • O(cn) – exponential time
  • O(n!) – factorial time

(n = size of input, c = some constant)

Here is the model graph representing Big-O complexity of some functions

graph model

cheers 🙂

graph credits http://bigocheatsheet.com/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)