+1 (218) 451-4151
glass
pen
clip
papers
heaphones

Repeat the previous problem, but use knowledge of the size of the list to traverse from the end…

Repeat the previous problem, but use knowledge of the size of the list to traverse from the end…

Repeat the previous problem, but use knowledge of the size of the list to traverse from the end of the list that is closest to the desired index.Exercise C-7.36Suppose we want to extend the PositionalList interface to include a method, positionAtIndex(i), that returns the position of the element having index i (or throws an IndexOutOfBoundsException, if warranted). Show how to implement this method, using only existing methods of the PositionalList interface, by traversing the appropriate number of steps from the front of the list.