Question: 1. Suppose we were using an array to store items in a list that is kept in sorted order. This means that you can add

 1. Suppose we were using an array to store items in

1. Suppose we were using an array to store items in a list that is kept in sorted order. This means that you can add items to the list, but cannot insist that an item be added to a particular index or position (like the start or the end), because that may not be the place the item belongs in sorted order. An example is shown below (with a list of double values). Add 300.0 to the list: 300.0 Add 250.0 to the list: 250.0, 300.0 Add 400.0 to the list: 250.0, 300.0, 400.0 Remove 300.0 from the list: 250.0, 400.0 Remove the smallest item from the list: 400.0 a. If the array is perfect size, find the signatures for the methods below. i. Add an item to the list ii. Remove a given item value from the list. ili. Remove the smallest item from the list b. If the array is oversize, find the signatures for the methods below. i. Add an item to the list ii. Remove a given item value from the list. ii. Remove the smallest item from the list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!