AlgorithmAn algorithm is a set of rule-based instructions that a computer follows to complete a specific task or solve a problem.