An algorithm is a procedure of steps that can be used to solve a problem, for example, lego building instructions. The two main types of algorithms are searches and sorts. Searches are a procedure used to locate a specific value in a collection of data. Sorts are a procedure that puts elements in order.