Information Technology Reference
In-Depth Information
Fig. 10.1 Example of pseudocode. This is not the best style of presentation: the algorithm is cryptic
and the numbering does not reflect the indentation. Also, the author has unnecessarily introduced
a trivial optimization (at lines 10 and 12) and the notation for variables is ugly. It is like a program
meant for a machine, not an explanation meant for a reader
Regardless of the presentation form chosen, you need to consider the extent
to which the algorithm, or its components, can be presented as mathematical
abstractions. Can a loop be described as an operation on a set? Does the order in which
array elements are processed matter? To understand pseudocode, a reader must rein-
terpret the sequence of statements as a higher-level abstraction; the algorithm should
be presented at such a level.
Search WWH ::




Custom Search