DEV Community

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

Posted on

1 1

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!

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay