it must be composed of finite number of steps if the description for the algorithm were made up of an infinite number of stepswe could never hope to write it downnor implement it as computer program most languages for describing algorithms (including english and "pseudocode"provide some way to perform repeated actionsknown as iteration examples of iteration in programming languages include the while and for loop constructs of java iteration allows for short descriptionswith the number of steps actually performed controlled by the input it must terminate in other wordsit may not go into an infinite loop programswe often think of computer program as an instanceor concrete representationof an algorithm in some programming language in this booknearly all of the algorithms are presented in terms of programsor parts of programs naturallythere are many programs that are instances of the same algorithmbecause any modern computer programming language can be used to implement the same collection of algorithms (although some programming languages can make life easier for the programmerto simplify presentation throughout the remainder of the texti often use the terms "algorithmand "programinterchangeablydespite the fact that they are really separate concepts by definitionan algorithm must provide sufficient detail that it can be converted into program when needed the requirement that an algorithm must terminate means that not all computer programs meet the technical definition of an algorithm your operating system is one such program howeveryou can think of the various tasks for an operating system (each with associated inputs and outputsas individual problemseach solved by specific algorithms implemented by part of the operating system programand each one of which terminates once its output is produced to summarizea problem is function or mapping of inputs to outputs an algorithm is recipe for solving problem whose steps are concrete and unambiguous the algorithm must be correctof finite lengthand must terminate for all inputs program is an instantiation of an algorithm in computer programming language further reading the first authoritative work on data structures and algorithms was the series of books the art of computer programming by donald knuthwith volumes and being most relevant to the study of data structures [knu knu modern encyclopedic approach to data structures and algorithms that should be easy