Task 3 ------ If we pass in an ArrayList, the worst-case efficiency is O(log n), where n is the number of items in the list. This is because: * Each iteration of the while loop cuts the problem size in half, and it takes O(log n) iterations to get down to a problem size of 1, at which point we will either find the item or realize it is not in the list. * Each iteration of the loop performs a constant (O(1)) number of steps, since the ArrayList version of getItem() is O(1). If we pass in an LLList, the worst-case efficiency is O(n log n), where n is the number of items in the list. This is because: * We again need at most O(log n) iterations to determine whether the item is in the list. * The LLList version of getItem() takes O(i) steps to get the item at position i. * In the worst case, each iteration of the loop updates min, which means that mid is always >= n/2, and each of the O(log n) calls to list.getItem(mid) requires at least n/2 steps. * Thus, the total number of steps is >= (n/2)(log n) = O(n log n). Note: Because linked lists don't have random access, binary search is actually less efficient than linear search for items stored in a linked list!