Classical Algorithms in Java