Algorithms in Java implements.