Algorithmic Efficiency is a measure of how well an algorithm performs its given task relative to resource usage. An efficient algorithm carries out a maximum amount of work using the least amount of resources, such as time, storage, memory, or energy. Algorithmic efficiency can be measured in terms of time complexity and space complexity. In computer science, the notion of an efficient algorithm is often compared to the “best” or “optimal” algorithm.

Time complexity is a measure of how long an algorithm takes to complete its task relative to the size of its input. An algorithm with time complexity O(n) means it takes a linear amount of time to complete, where n is the size of the input. An algorithm with time complexity O(n^2) takes a quadratic amount of time to compute.

Space complexity is a measure of the amount of memory an algorithm consumes. Memory criteria for space complexity include total space complexity (total memory used at the end of the algorithm’s run), working space complexity (maximum memory used at any given period of the algorithm’s run) and auxiliary space complexity (space required by the algorithm for its wrong functioning). Similar to time complexity, space complexity is also expressed in Big O notation.

The most efficient algorithms are those that make the best use of the space and time allotted for each task. This means an algorithm with low time and space complexity will outperform an algorithm with high time and space complexity for a given task. Algorithmic efficiency is an important factor in evaluating how well a program or application will perform.

## Trusted By 10000+ Customers Worldwide

English
English
Русский

Português do Brasil
Français
Español
Türkçe
Polski
Tiếng Việt
한국어
Nederlands
Italiano

Eesti
Čeština
മലയാളം
Bahasa Melayu
हिन्दी
اردو