Algorithms and data structures in Java