code snippets for algorithms