What is Algorithm?

Legal Definition
The procedure an operation to get the best possible result. They have a beginning, middle, and end when the steps are complete. The output is the same as the input. The best problem to use an algorithm on is one with no judgement calls. Refer to heuristic