An algorithm is a strategy for solving a problem – it could be a math problem; deciding what stories to show on a social media feed; figuring out how to display a picture on a football scoreboard; or something else. Algorithms are portable between computer languages so their distinct from computer programs, which are algorithms made functional.
A good analogy is that algorithms are like a sketch in a home design book – it gives you a picture of what a house looks like and general design features.
Programs are like detailed blueprints for a house – they can be used to tell a specific computer how to set everything up to run the algorithm, how to build the house in a specific location.
Running programs on a computer are the house. They are a specific instance of the design.
Latest Answers