java implementation of popular algorithms, some implemented in PHP