DEV Community

Cover image for Big O Time/Space Complexity Types Explained - Logarithmic, Polynomial, Exponential, and More
QuanticDev
QuanticDev

Posted on

Big O Time/Space Complexity Types Explained - Logarithmic, Polynomial, Exponential, and More

Hi all,

Today I will talk about the most important time and space complexity types. Time and space complexities are a measure of a function's processing power and memory requirements. Many time/space complexity types have special names that you can use while communicating with others. While some of the names for complexity types are well known, like linear and constant time, some others are living in the shadows, like quadratic and factorial time. In this video, I will use the big O notation to denote the complexities, which is specifically used to describe the worst-case performance of algorithms. If you want to see or read it, below are the links for the video and article:

Video: https://www.youtube.com/watch?v=GesAhP5jYLo
Article: https://quanticdev.com/articles/primitives/big-o-time-space-complexity-types-explained

Outline of the video/article:

  • Overview
  • Constant Time/Space Complexity: O(1)
  • Logarithmic Complexity: O(logn)
  • Linear Complexity: O(n)
  • Polynomial Complexity: O(n^k)
  • Exponential Complexity: O(2^n)
  • Factorial Complexity: O(n!)
  • Alternative Big O Notation
  • Conclusion

I suggest the video format as it has animations for the references algorithms, which can help you comprehend them easier. Have fun learning!

Top comments (0)