Skip to content
Marlbridge

Study Guides

AQA A-Level Computer Science: Data Structures and Arrays (7517)

Guide to AQA A-Level Computer Science 7517 sections 4.2.1.1 and 4.2.1.2: what a data structure is, and using one- and multi-dimensional arrays in solutions.

Level
A LEVELS
Topic
Fundamentals of data structures
Updated

Aligned to AQA A Level Computer Science (7517), 2015-onwards. Official specification .

Syllabus points this page covers

7517

  • 4.2.1.1 Data structures
  • 4.2.1.2 Single- and multi-dimensional arrays (or equivalent)

Found an error? Report a correction.

This guide covers 4.2.1.1 Data structures and 4.2.1.2 Single- and multi-dimensional arrays (or equivalent), from AQA A-Level Computer Science (7517), first teaching 2015. These sub-topics open 4.2.1 Data Structures and Abstract Data Types, within Topic 2 Fundamentals of Data Structures.

Scope of this guide

4.2.1 has four sub-topics: 4.2.1.1 and 4.2.1.2 (covered here); 4.2.1.3 Fields, Records and Files, which covers reading and writing text and binary files; and 4.2.1.4 Abstract data types/data structures, which introduces queues, stacks, graphs, trees, hash tables, dictionaries and vectors, and the distinction between static and dynamic structures. This resource focuses on the conceptual and array-based content that underpins the rest of the data structures section; file handling and the named abstract data types are each left for their own dedicated resources.

Syllabus coverage

AQA A-LEVEL COMPUTER SCIENCE (7517) — 4.2.1.1 DATA STRUCTURES

Students should be familiar with the concept of a data structure. The specification’s own guidance suggests setting this concept in contexts students may already be familiar with, and demonstrating how data structures can be used in a practical setting.

4.2.1.2 SINGLE- AND MULTI-DIMENSIONAL ARRAYS (OR EQUIVALENT)

Students should be able to use arrays (or equivalent) in the design of solutions to simple problems. A one-dimensional array is a useful way of representing a vector. A two-dimensional array is a useful way of representing a matrix. More generally, an n-dimensional array is a set of elements with the same data type, indexed by a tuple of n integers, where a tuple is an ordered list of elements.

How to approach it

Start from the specification’s own definition rather than a looser, informal one: a data structure is a way of organising and storing data so that it can be accessed and used efficiently for a given task. Being able to define this precisely, and then justify why a particular structure suits a particular problem, is what separates description from application in exam answers.

For arrays, the specification’s language is precise and worth mirroring exactly. A one-dimensional array represents a vector — a single ordered list of values, each accessed by one index. A two-dimensional array represents a matrix — values arranged in rows and columns, each accessed by two indices (row, column). The general n-dimensional case extends this: an element is located by a tuple of n integers, one per dimension. When asked to choose or justify a data structure for a scenario, explicitly naming the number of dimensions needed and why is a stronger answer than simply saying “use an array.”

Since AQA’s specification says “(or equivalent)” for arrays, be aware that different exam boards’ pseudocode and different programming languages (Python lists, for example) implement the same underlying concept slightly differently — AQA publishes no pseudocode command set of its own at AS or A-level, so know how arrays are declared, indexed and iterated over in whichever language or convention your own course actually uses for practical work, and check its index origin (0 or 1) rather than assuming one.

Three arrays. A 1D array of 5 cells needs 1 index. A 2D array of 3 rows by 4 columns has 12 elements and needs 2 indices. A 3D array of 2 by 3 by 4 has 24 elements and needs 3 indices. Dimensions count the indices; size counts the elements.
Dimensionality is how many indices locate an element; size is how many elements the array holds.
The same four-cell array A, B, C, D drawn twice. Indexed from 0 the cells are numbered 0 to 3, so the third element C is at index 2. Indexed from 1 they are numbered 1 to 4, so C is at index 3.
The same element has a different index depending on the origin your course uses, so check it before relying on either.

Worked example: choosing an array dimension for a problem

A question describes a program that needs to store the temperature recorded at 7am, 1pm and 7pm for each of the 7 days in a week, and asks which data structure is most appropriate.

Data needed:     3 readings x 7 days = 21 values, naturally organised
                 by day and by time of day
Structure:       a two-dimensional array, e.g. temperatures[7][3]
Justification:   the first index represents the day (0-6), the second
                 represents the time slot (0-2 for 7am/1pm/7pm); this
                 lets the program access, update or loop through any
                 single reading, an entire day's readings, or a single
                 time slot across all days, using clear index logic
                 rather than 21 separate variables

Justifying the choice in terms of how the data will actually be accessed — not just that “it fits” — is what this sub-topic is really assessing.

Key terms to define precisely

Data structure — a way of organising, storing and accessing data so it can be used efficiently for a particular task. Vector — a one-dimensional, ordered collection of values of the same data type, each accessed by a single index. Matrix — a two-dimensional arrangement of values organised into rows and columns, each accessed by a pair of indices. Tuple — an ordered list of elements, used in the specification’s definition to describe how an element in an n-dimensional array is located (by a tuple of n integers, one per dimension). Index — the position used to identify and access a specific element within an array; AQA sets no pseudocode convention of its own at this level, so check whether your own course indexes arrays from 0 or from 1. Being precise about the difference between an array’s dimensionality (how many indices are needed to locate an element) and its size (how many elements it holds in total) avoids a common source of confusion when describing or declaring arrays in exam answers.

A grid with 7 rows for days 0 to 6 and 3 columns for the 7am, 1pm and 7pm readings, giving 21 cells. The cell at row 4, column 1 is highlighted and labelled temperatures[4][1].
temperatures[7][3] stores 3 readings x 7 days = 21 values; the first index is the day and the second is the time slot.
Three copies of the 7 by 3 temperature grid. In the first, one cell is highlighted: a single reading. In the second, one row of 3 cells: all readings for one day. In the third, one column of 7 cells: one time slot across all days.
Two indices let a program reach one reading, a whole day, or one time slot across all days, instead of 21 separate variables.

Common mistakes

Describing an array only as “a list of values” without reference to indexing or dimensionality, missing the specification’s more precise definition. Confusing a one-dimensional array (vector) with a two-dimensional array (matrix) when justifying a choice of structure. Using 21 separate variables instead of a structured array when a problem clearly calls for one, missing the point of the sub-topic entirely. Miscounting indices when describing how to access a specific element in a multi-dimensional array.

Quick revision checklist

  • Be able to give a precise definition of what a data structure is.
  • Know that a one-dimensional array represents a vector and a two-dimensional array represents a matrix.
  • Practise justifying a choice of array dimensionality against a described problem, not just naming “array” as the answer.
  • Be comfortable with looping through one- and two-dimensional arrays in your course’s chosen language, and confirm whether it indexes from 0 or from 1 before relying on either.

Frequently asked questions

What is a data structure in AQA A-Level Computer Science? A data structure is a way of organising, storing and accessing data so that it can be used efficiently for a particular task.

What is the difference between a vector and a matrix in AQA 7517? A one-dimensional array represents a vector, a single ordered list where each value is accessed by one index. A two-dimensional array represents a matrix, with values in rows and columns accessed by two indices.

Does AQA A-Level Computer Science index arrays from 0 or 1? AQA sets no pseudocode convention of its own at this level, so check whether the language or convention your course uses indexes arrays from 0 or from 1.

How do you justify choosing an array in an exam answer? State how many dimensions are needed and explain how the data will be accessed, for example a two-dimensional array indexed by day and time slot, rather than just saying use an array.

More resources on this topic

Data Structures and Arrays revision notes | Data Structures and Arrays practice questions

Official syllabus

AQA A-Level Computer Science (7517) specification, first teaching 2015 — aqa.org.uk/7517.

A row of seven array cells numbered 0 to 6, each holding one value of the same type. One index, 3, points at one cell, which holds 23 (illustrative value).
A one-dimensional array is a vector: an ordered list of same-type values, each reached with a single index.

Related resources

Get free revision emails (optional)

Occasional emails with practice questions, worked explanations and links to free resources for the qualification and subjects you choose. No spam, and you can unsubscribe from any email. The free tools on this site never need an email.