You visited us 0 times! Enjoying our articles? Unlock Full Access!
Question
A both (1) and (2) B the function on which running time and / or space is given in terms of input size C time and spaces are two main factor D None of these
Open in App
Solution
Verified by Toppr
Complexity depends on The function on which running time and /or space is given in terms of input size. Time and spaces are two main factor. The number of (machine) instructionswhich a program executes during its running time is called its time complexity. This number depends primarily on the size ofthe program's input, that is approximately on the number of the strings to besorted (and their length) and the algorithm used. Time and space complexity depends onlots of things like hardware, operating system, processors, etc. However, wedon't consider any of these factors while analysing the algorithm. We will onlyconsider the execution time of an algorithm.
Was this answer helpful?
1