Question: There are two implementations of a list ADT. A list can be implemented as an array, for example, a list of integers which can be
There are two implementations of a list ADT. A list can be implemented as an array, for example, a list of integers which can be represented by an integer array. A list can also be represented by a linked list, a collection of nodes linking the elements to form a list. What are the advantages and disadvantages of each representation? Discuss the efficiency of the following operations in each representation: insert an element, delete an element, print elements, search for an element.
What other operation(s) do you think would be useful to add to the list ADT? Any suggestion on the algorithms for implementations the operations and/or time complexity of the operation(s)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
