an algorithm is a set of instructions for solving some problem, step-by-step