Algorithm and Data Structure 1 using Java