Efficiency of Algorithms 1. Insertion sort 2. Bubble Sort Shackelford lecture notes 6 3. To specify a module, it is enough to provide the header line together with a comment s line. The header line provides the module name and a list of formal parameters, and, in the case of a function, the type of value returned by the function.
Programmers can implement modules that are well-specified.
A major task of software engineering is to specify modules. Efficiency of Algorithms Analyzing an algorithm means to predict the resources the algorithm consumes. We are usually interested in computational time , although we may be interested in memory, communication bandwidth, or logic gates. In analyzing several algorithms, we can usually find the best one in terms of running time. Factorial is a very fast-growing function.