What is a data Structure
Collection of data items stored in memory
Dynamic
Data structure can change size at run time
Static / Fixed
Cannot change size at run time
Mutability
Can change contents of data structure at run time
Immutable
Contents can not be changed at run time
Lists
Arrays
Linked lists pros / cons
Pros:
- Adding and removing values is easy
- Only as much memory as required is used
- Flexible in size
Cons:
- Memory overflow (adding items untill run out of memory)
- Searching though large lists is slow
- Python has to keep track of where memory locations are