DEV Community

Ryan Heo
Ryan Heo

Posted on

[Algorithm] Big O

Time Complexity

Big O

  1. Best case scenario (Omega)
  2. Average case scenario (theta)
  3. Worst case scenario (O)

We always talk about the worst case, Big O.

1. O(n)

Proportional Graph
Drop Constants

2. O(n^2)

Exponential Graph
Drop Non-dominant

3. O(1)

Flat Graph

4. O(log(n))

Efficient than O(n) and O(n^2)
Quite Flat

5. O(n log(n))

Some Sorting Algorithm

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

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

Okay