What is the difference between an algorithm and a programming model?

boffin picture boffin · Sep 24, 2012 · Viewed 13.7k times · Source

What is the difference between an algorithm and a programming model (or paradigm)?

Answer

Antti Huima picture Antti Huima · Sep 24, 2012

An algorithm is a predetermined set of rules for conducting computational steps that produce a computational effect. A programming model is a framework for expressing algorithms, but is not an algorithm itself.

For example, quicksort is an algorithm as it has a predetermined set of rules for carrying out steps to sort an array. Event-driven programming is a programming model; in itself, it does not tell how to carry out steps to solve an actual problem but it provides a framework for expressing algorithms (in an event-driven manner).