An algorithm is a solution to a problem. Computer scientists are in the problem-solving business. They use techniques of structured programming to develop solutions to problems. Algorithms will range from the easier "finding the average of two numbers" to the more difficult "visiting all the subdirectories on a hard disk, searching for a file."
A major task of the implementation stage is the conversion of rough designs into refined algorithms that can then be coded in the implementation language of choice.
Pseudocode refers to a rough-draft outline of an answer, written in English-like terms. These generally use phrases and words that are close to programming languages, but avoid using any specific language syntax. Once the pseudocode has been developed, translation into code occurs more easily than if we had skipped this pseudocode stage.
Stepwise refinement is the process of gradually developing a more detailed description of an algorithm. Problem solving in computer science involves overall development of the sections of a program, expanding each section with more detail, later working out the individual steps of an algorithm using pseudocode, and then finally writing a code solution.
Last modified: December 12, 2022
Back to Control Structures