Collection of basic algorithms