Begin with an English description of how the algorithm works. You
may want to include examples and diagrams of the data structures
that help make the operation of the algorithm more clear. About
one or two paragraphs of text is usually enough. Include a
general overview of the approach and goals. For recursive
algorithms it is often useful to clearly describe the base and
inductive cases that make the algorithm correct.
Follow basic Java or C++ syntax. Avoid the use of overly
advanced Java or C++ features. Do not rely on pre-defined classes
from the Weiss book unless that is explicitly part of the assignment.
You can introduce definitions for the relational operators applied
to non-numeric types. For example, you might write
Define (F < G) for nodes F and G to hold iff (F.data < G.data)
This should be done only to clarify, never to obscure, the
presentation. If you have any questions about whether a definition or
abbreviation is okay to include check with the TA.
Include meaningful comments in the body of the pseudocode.
Try to make the program as succinct and elegant as you can. This
is not only good style but usually makes the algorithm easier for
others to understand.
Pseudocode should be typed (preferred) or VERY neatly handprinted.
If we have difficulty reading your homework you will lose points!