An Abstract Data Type (ADT) is a mathematical model for a structure of information.
They are composed of:
- a Definition
- Operations
- Rules
- and Functions
Some examples of ADTs are:
- Lists
- Trees
- Stacks
- Queues
- Dictionaries
ADTs are used because:
- They make it easier to reason with complex data structures, especially when writing complicated algorithms.
- (e.g. it's easier to say you're working with a 'list' rather than constantly defining a series of variables)
- ADTs have expected properties and behaviours by convention, which means they are independent of its implementation.
- (e.g. a list works like a list, no matter which programming language)