retagged by
84,491 views
4 votes
4 votes

Two main measures for the efficiency of an algorithm are:

  1. Processor and Memory
  2. Complexity and Capacity
  3. Time and Space
  4. Data and Space
retagged by

4 Answers

0 votes
0 votes
To measure how good a algorithm we do time and space analysis.

So C is correct.
0 votes
0 votes

Some algorithms are more efficient than others. We would prefer to chose an efficient algorithm, so it would be nice to have metrics for comparing algorithm efficiency.

The complexity of an algorithm is a function describing the efficiency of the algorithm in terms of the amount of data the algorithm must process. Usually there are natural units for the domain and range of this function.

There are two main complexity measures of the efficiency of an algorithm:

Time complexity is a function describing the amount of time an algorithm takes in terms of the amount of input to the algorithm. "Time" can mean the number of memory accesses performed, the number of comparisons between integers, the number of times some inner loop is executed, or some other natural unit related to the amount of real time the algorithm will take. We try to keep this idea of time separate from "wall clock" time, since many factors unrelated to the algorithm itself can affect the real time (like the language used, type of computing hardware, proficiency of the programmer, optimization in the compiler, etc.). It turns out that, if we chose the units wisely, all of the other stuff doesn't matter and we can get an independent measure of the efficiency of the algorithm.

Space complexity is a function describing the amount of memory (space) an algorithm takes in terms of the amount of input to the algorithm. We often speak of "extra" memory needed, not counting the memory needed to store the input itself. Space complexity is sometimes ignored because the space used is minimal and/or obvious, but sometimes it becomes as important an issue as time.

0 votes
0 votes
The correct answer is Option C: Time and Space Complexity. Time complexity measures the amount of time it takes the algorithm to complete, while space complexity measures the amount of memory required to run the algorithm.
Answer:

Related questions

1 votes
1 votes
1 answer
1
admin asked Mar 31, 2020
1,080 views
What is the solution to the recurrence $T(n)=T \bigg (\dfrac{n}{2} \bigg )+n$?$O(\log n)$$O(n)$$O(n\log n)$None of these
0 votes
0 votes
2 answers
2
2 votes
2 votes
2 answers
3
admin asked Mar 31, 2020
8,581 views
The Knapsack problem belongs to which domain of problems?OptimizationNP completeLinear SolutionSorting
2 votes
2 votes
4 answers
4
admin asked Mar 31, 2020
15,242 views
The running time of Quick sort algorithm depends heavily on the selection of:No. of inputsArrangement of elements in an arraySize of elementsPivot Element