Collection of some common algorithms (implemented in JAVA)