ABSTRACT

This chapter looks at a number of different algorithms to get some practice in tracing and trying to understand algorithms. Algorithms play an extremely important role in both computer science and mathematics. Algorithms are detailed instructions on how to carry out some specific task. Computer programs are implementations of algorithms, so it is very important that computer science majors and programmers have a good understanding of how algorithms work. Designing an algorithm is one of the first steps in writing a computer program. In order to make algorithms easier for understand they are written in a form of English called pseudocode. Algorithms use something called control structures to tell the algorithm what to do at different times. These are instructions that control how the algorithm works. Conditional controls give conditions for the execution of an algorithm step. Loop controls tell how many times a step in the algorithm should be executed.