Data Structures
What is a data structure?
- A data structure is a way of organising and storing data in a computer
- There are many data structures in computer science and they are each used for various purposes, these include:
- Arrays
- Lists
- Records
Where are data structures used?
- Data structures are used in almost every program ever created
- Arrays and lists are used in programs to store a collection of data under one identifier
- Records are used to store a collection of data about an object or person
- More information about each of these data structures is available in this programming section
Examples of real-world use
- 2D Arrays can act like a table to store information such as usernames and passwords
- A car showroom would have a database of their cars in stock and they would have a record for each car which would include information such as
- Make
- Model
- Colour
- Year it was made
- A search engine would make use of a data structure called a hash table to store keyword information
Example of a hash table data structure