pseudocode of common algorithms