Overview
We'll now look at a new data structure type called a DynamicList which supports indexed access and adding and removing elements.
DynamicList is an ADT and as you recall this means that this type is an idea.
Although ADTs are not constructable as ideas, we will see them all over, even in code. Think about Java's ever-present "List" interface, which is an ADT idea.
Take a quick review ADT as needed.
General Mechanisms
General mechanisms of a DynamicList type:
- Supports indexed access
- Supports adding/inserting/removing elements
- Elements are ordered in the order they are added/appended
- Elements are not sorted (unless they are appended as pre-sorted)