Question: SortedArrayList.java o Implemented the findLinear method that sequentially checks each element in the list for a particular element and returns the number of comparisons needed


SortedArrayList.java o Implemented the findLinear method that sequentially checks each element in the list for a particular element and returns the number of comparisons needed to find the element. o Written a short comment in findLinear that describes how the number of comparisons will scale with the number of items in the list, and whether the order of the data might affect the number of comparisons o Modified the add(E element) method so that items are automatically stored in alphabetical order o Written a main method that adds a few strings to an instance of SortedArrayList, prints the list to demonstrate that it is in alphabetical order and prints the number of comparisons needed to find one of the items. public class SortedArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
