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

Опубликовано: 17 Октябрь 2024
на канале: QuanticDev
8,174
250

Today we will investigate 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.

Outline of this video:
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

Alternative Big O Notation poster, stickers, mugs, and more:
https://quanticdev.com/shop
https://www.redbubble.com/shop/ap/542... (Alternative Big O Notation artwork)
https://www.redbubble.com/shop/ap/540... (Quantic Developers Club artwork)

My "Kadane's Algorithm" video, which is a great demonstration of an O(n) linear time complexity and O(1) constant space complexity algorithm:
   • Kadane's Algorithm and Its Proof - Ma...  

Wikipedia articles referenced in this video:
List of all time/space complexities: https://en.wikipedia.org/wiki/Time_co...
Asymptotic analysis: https://en.wikipedia.org/wiki/Asympto...

If you want to read or contribute, you can find this guide on:
https://quanticdev.com/articles/primi...

My Algorithms Playlist:
   • Algorithms  

- - - - - - - - - -
  / quanticdev  
  / quantic_dev  
https://quanticdev.com