Computer Science, asked by atif8896, 10 months ago

5 major difference between algorithm and program

Answers

Answered by Anonymous
4

Answer:

Explanation:

An algorithm is defined as a well-defined sequence of steps that provides a solution for a given problem, whereas a pseudocode is one of the methods that can be used to represent an algorithm. ... Program on the other hand allows us to write a code in a particular programming language.

Answered by Anonymous
14

Hey mate ☺️

An algorithm is just a collection of instructions to do something. But that's pretty abstract, it's not tied to the specific way its done. For example there's a maze solving algorithm that goes like this: "Whenever you reach an intersection in the maze, take an unmarked path at random if available, then mark it. If no unmarked paths are available, take a path with a single mark at random and give it a second mark. Do not follow any path marked twice." This is an algorithm, but its not a program, how you perform it, or how a machine performs it will be different, but you can still all perform it.

However if you take that algorithm and you write it up in a programming language, to perform that algorithm on a piece of hardware, on a system that can execute that code, then you have a program.

The algorithm is the logic, the program is how its implemented.

I Hope it helps you ☺️ ✌️ ✌️

Similar questions