An algorithm is a sequence of steps to be followed to accomplish a certain task. Often used in computer programming, they can become interesting puzzles because even though there can be many ways to accomplish something, one may be better than another.