Week 2 Discussion Forum

What is efficiency of an algorithm?

What is efficiency of an algorithm?

by Abu Salkin -
Number of replies: 0

In, computer science, algorithmic efficiency is a property of an algorithm which relates to the number of computational resources used by the algorithm. An algorithm must be analyzed to determine its resource usage, and the efficiency of an algorithm can be measured based on the usage of different resources. Algorithmic efficiency can be thought of as analogous to engineering productivity for a repeating or continuous process.

For maximum efficiency, we wish to minimize resource usage. However, different resources such as time and space complexity cannot be compared directly, so which of two algorithms are considered to be more efficient often depends on which the measure of efficiency is considered most important.

For example, bubble sort and timesort are both algorithms to sort a list of items from smallest to largest. Bubble sort sorts the list in time proportional to the number of elements squared (Big O notation), but only requires a small amount of extra memory which is constant with respect to the length of the list.

167 words