Data structures and algorithms in Java