Why programs need data structures
Why programs need data structures
![Comparison diagram showing a one-dimensional array of scores with indexes, a two-dimensional seating grid with seats[1,2] labelled, and a car record with named fields.](/_next/image?url=https%3A%2F%2Fassets.mathsgenie.co.uk%2Flesson-v2-img%2Finline%2Fb11a93e6-4c86-4e15-8217-6014e180e59d.png&w=3840&q=75)
A variable stores one value, but most programs need collections of related values. A data structure is the way a program organises that data so it can be stored, accessed, and updated sensibly.