Question: 1. Implement a BlockedList class that implements the List interface. You may use any of the classes in JCF or in the textbook code. The
1. Implement a BlockedList class that implements the List interface. You may use any of the classes in JCF or in the textbook code. The constructor for this class takes an integer block size b and the implementation should have these performance characteristics: 1. get(i) and set(i,x) should run in 0(1) time per operation 2. add(1X) and remove(i) should run in O( b + min{ i , n-t )/ b ) amortized time : per operation. package comp248202 import java.util.Abstractlist import java.utit.Collection * This is a copy of the 3CF class ArrayList. It implements the List interface as a single array a. Elenents are stored at positions atel...alsize()-11. Doubling/hatving is used to resize the array * a when necessary * gauthor morin * eparan
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
