Here's the question you clicked on:
Khadeejah
what is algorithm?
An algorithm is a finite sequence of clear, discrete steps to compute something, such as a function, or to reach a goal or solve some sort of problem.
contrast algorithms with heuristics, which are problem-solving methods which do not typically guarantee optimal results or are as error-proof as algorithms, but which are employed to get results quicker.