Worked solution from the Programming Paper 2 Algorithms, Programming and Logic booklet, Part 2 of 3.
Explain both terms and give an example.
Dimension: the number of indexes needed to reach one element, so Names[5] is one-dimensional and Grid[2, 3] is two-dimensional [1]
Index: the position of an element in the array, so in Names[5] the index 5 points to the 5th element [1]
Example given for the arrays, such as A[25] being the 25th element of a one-dimensional array [1]
▶ Whole paper
Video solution of the whole paper · by Zafar Ali Khan (ZAK). Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.