First off I want to say these are three separate questions on a study guide of mine.
- "What are the differences between the array and linked implementations of the list ADT".
- "What are the differences between the array and linked implementations of the stack ADT".
- "What are the differences between the array and linked implementations of the queue ADT".
I thought that they all have the same differences which is based on the two memory allocation schemes I will explain below.
I know that arrays use an contiguous memory allocation where it is all in one contiguous block of memory. For the linked version it uses multiple non-contiguous memory blocks. I understand the pros and cons to both contiguous and non-contiguous memory allocation so I am not looking for an explanation on that. I have been searching through both my notes and java book for more differences between them.
I am curious if there is more differences between an array and a linked implementation for stack, list, and queue ADT or if it is only based on the contiguous and non contiguous memory allocations.