Explain in details how the function delete can be


Array

3

17

5

20

14

4

List

3

17

5

20

14

4

1. Consider the above data structures, Array and List, both having the same integer values stored in them. Explain what happens in memory when 20 is deleted in both data structures.

2. Explain in details how the function Delete() can be implemented for arrays to function exactly as it would with lists. Use pseudo code to clarify your explanation.

3. Consider two different ways for deleting an element in an array to accomplish requirement #2. The first of which copies all elements of the array into another array except the element you wish to delete then destroys the former array. The other deletes the element within the array at hand and adjusts the array positions accordingly. Which method is more computationally efficient and why? If necessary, use pseudo code to support your claim.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Explain in details how the function delete can be
Reference No:- TGS0644239

Now Priced at $40 (50% Discount)

Recommended (97%)

Rated (4.9/5)