Skip to content

tigerabrodi/big-o-notation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Big O Notation

The time it takes to run your function, as the size of your input grows. How does the runtime of this function grow?

Check the Big O Notation for each expression, and eventually add them up.

  • Linear Time O(n): Increases almost lineary with the size of the input, i.e. a for loop.

  • Constant Time O(1): Operation always takes the same time, i.e. array look up.

  • Quadratic Time O(n²): Increases as the square of the number of points, i.e. a nested for loop.

  • Polynomial Time O(n^c): Polynomial running is represented as, when c > 1.

  • Logarithmic Time O(log n): Logarithmic time complexities usually apply to algorithms that divide problems in half every time.

  • Exponential Time O(2^n): Exponential (base 2) running time means that the calculations performed by an algorithm double every time as the input grows.

About

Notes about Big O Notation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published