An algorithm which puts elements of information in a given order. A known implementation is bubble sort in C++.