Understanding Time Complexity Of Algorithms 13Aug, 2019

Understanding Time Complexity Of Algorithms

In Computer Science, the efficiency of any program or algorithm is measured in terms of the Time and Space Complexity of that algorithm. In this article, we will talk about the Time Complexity of the algorithms and have a look at different algorithms with some common time complexities. Time Complexity, in computer science, is measured as the amount of “computational time” it takes to execute the elementary operations/statements that execute in a fixed time. The time complexity is generally denoted by the Big O notation and it is taken as a function of the input of the algorithm. To understand it better, let’s take a look at some programs: long NumberOfHandShakes(int persons_in_the_room) { long handshakes = (persons_in_the_room * (personss_in_the_room -…

Posted in: HTML, OOPs