Time Complexity of Algorithms Explained with Examples

Index

  1. What is Time Complexity
  2. Big O Notation
  3. How to calculate Time Complexity
  4. Short Hand Rule to calculate Time complexity — Drop the constants and Remove all non-dominant terms
  5. Example Time
  6. Types of Time Complexities — Constant, Linear, Quadratic, Polynomial, Logarithmic, linaerithmic and Exponential, Time Complexity.
  7. Conclusion
  8. FAQ’s

What is Time Complexity of algorithms?

Time complexity is the amount of time taken by an algorithm to run, as a function of the length of the input. Here, the length of input indicates the number of operations to be performed by the algorithm.

Big O Notation

It is used to express the upper limit of an algorithm’s running time, or we can also say that it tells us the maximum time an algorithm will take to execute completely. It is also used to determine the worst-case scenario of an algorithm.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store