Java data structures and algorithms