Post

Algorithm and Time Complexity

Algorithm

Alorithm is a series of contained steps which you follow in order to achieve some goal, or to produce some output

Big-O Notation

Big-O Time Complexity

Big-O Complexity Chart: https://bigocheatsheet.com/

Time Complexities

  1. Constant time – O (1)

  2. Linear time – O (n)

  3. Logarithmic time – O (log n)

  4. Quadratic time – O (n^2)

  5. Cubic time – O (n^3)

References:

This post is licensed under CC BY 4.0 by the author.