Algorithms implemented in Java