Java exercises, data structures and sorting algorithms