commonly used algorithms