Definitions
An algorithm is a set of precisely defined steps to calculate an answer to a problem or set of problems, and which is guaranteed to arrive at such an answer eventually. As this implies, a set of steps that might never end is not, strictly speaking, an algorithm.[3]
[3] I should note that there is some disagreement on this fine point of definition. Some people consider a procedure to be an algorithm even if it may never end.
Programming is the art and science of solving problems by the following procedure:[4]
[4] This definition is possibly somewhat misleading since it implies that the development of a program is straightforward and linear, with no revisions required. This is known as the “waterfall model” of programming, since water ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access