What is Time Complexity of an Algorithm || Lesson 4 || Algorithms || Learning Monkey ||

Publié le: 12 juin 2022
sur la chaîne: Learning Monkey
8,281
147

What is Time Complexity of an Algorithm

This class will try to understand What is Time Complexity of an Algorithm.

We have already discussed “why algorithm analysis is required” in our previous classes.
What is Time Complexity of an Algorithm

Time Complexity: The Time Complexity of an algorithm is the amount of computer time it needs to run to completion.

Though the definition of the time complexity looks straightforward, understanding this in-depth is covered in the following 4 to 5 classes.

To understand this consider the algorithm shown below.

In the above algorithm, consider only the first line code.

sum = a + b;

Though it looks like just one single line of code to execute this, the compile will run many micro-operations.

First, variable a has to be loaded, and then variable b must be loaded.

Now, “a + b” is done in ALU, and then the sum value is stored in the sum location.

There are many different factors to be considered to find the time complexity of an algorithm.

These factors are not constant all the time.

They will change from one instance to another instance.

The kind of factors is called instance characteristics.

To find an algorithm’s time complexity, we will consider only the program step.

In the next class, we will discuss the program step.

#algorithms #gatecse #learningmonkey #computerscienceengineering #competitivecoding #placementtraining




Link for playlists:
   / @learningmonkey  


Link for our website: https://learningmonkey.in

Follow us on Facebook @   / learningmonkey  

Follow us on Instagram @   / learningmonkey1  

Follow us on Twitter @   / _learningmonkey  

Mail us @ [email protected]


Sur cette page du site, vous pouvez voir la vidéo en ligne What is Time Complexity of an Algorithm || Lesson 4 || Algorithms || Learning Monkey || durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Learning Monkey 12 juin 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 8,281 fois et il a aimé 147 téléspectateurs. Bon visionnage!