Data structure, algorithms and problems in Java