Java Data Structure and Algorithm solutions