An algorithm is a set of step-by-step instructions for solving a problem.
An algorithm is a clear, finite sequence of steps that solves a specific problem, such as sorting a list of numbers or finding a value in a list. Every program is built on algorithms. Learning to write good algorithms is also essential for coding interviews.