Learning Algorithms and implementation in Java