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

Veröffentlicht am: 12 Juni 2022
auf dem Kanal: 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]


Auf dieser Seite können Sie das Online-Video What is Time Complexity of an Algorithm || Lesson 4 || Algorithms || Learning Monkey || mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Learning Monkey 12 Juni 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 8,281 Mal angesehen und es wurde von 147 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!