An algorithm is a set of rules or steps to solve a problem.