In Exercise 6, you wrote a Replace function for the List type that deletes one value and replaces it with another. Reimplement the Replace function for the SortedList type. Note that in this case, the replacement value needs to be inserted in the proper position in the list to maintain the ordering of the items.
Exercise 6
We would like to add a Replace function to the List type in this chapter that takes two parameters, oldItem and newItem of ItemType. The list is unchanged if oldItem is not present in the list. Write the code that must be added to the specification file for the type to enable us to add this function.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.