Question: Data Structures and Algorithm Analysis in C++ by Clifford Shaffer 4.1.3 Comparison of List Implementations Now that you have seen two substantially different implementations for






Data Structures and Algorithm Analysis in C++ by Clifford Shaffer

4.1.3 Comparison of List Implementations Now that you have seen two substantially different implementations for lists, it is natural to ask which is better. In particular, if you must implement a list for some task, which implementation should you choose? Array-based lists have the disadvantage that their size must be predetermined before the array can be allocated. Array-based lists cannot grow beyond their predetermined size Whenever the list contains only a few elements, a substantial amount of space might be tied up in a largely empty array. Linked lists have the advantage that they only need space for the objects actually on the list. There is no limit to the number of elements on a linked list, as long as there is free-store Loc 1649 of 7820 21%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
