Algorithm collection (Java)