24 Design and Analysis of Algorithms
This tells us that an algorithm’s correctness does not necessarily imply anything about its effi ciency.
Usually, exhaustive algorithms, similar to the one just discussed, are very ineffi cient.
2.2.5 Implementation in Some Programming Language
Once the algorithm is designed and checked for correctness, it is time to code it in some programming
language. This can be a straightforward or diffi cult task, depending upon how clearly the algorithm is written,
and the programming strategy adopted, including the language chosen.
One major diffi culty is that we must design the data structures to represent important information held
within the algorithm. To do this we must answer the following questions.
1. What are ...