Practicing Data structures and algorithms in Java