A computer program is a complete product that allow the user to accomplish some set of related tasks. A media player, a word processor, a game, etc. are all programs that have many related functions for some specific task or set of tasks.
An algorithm is a set of instructions and logic that accomplishes some goal. They can be very simple or very complex. They typically take some data, process it, and then return some result.
A simple algorithm might be one that takes a list of cities and tells you which two are the closest. It’s a simple calculation with a simple dataset.
A more complex algorithm might be one that takes a list of online shopping profiles, analyzes buying patterns, then recommends products to other shoppers with similar buying patterns.
A typical computer program is made of many algorithms that are each responsible for a different task within that program.
Latest Answers