Question 2
AQA Computer Science June 2022 Paper 1 (7517/1)A level39 marks
On the specification
- 2.1
- 4.2 Fundamentals of data structures
- 2.2
- 3.2 Fundamentals of data structures
- 2.3
- 4.2 Fundamentals of data structures
- 2.4
- 4.2 Fundamentals of data structures
- 2.5
- 4.2 Fundamentals of data structures
Question text
2 A queue data structure can be implemented as a static data structure using an array. 2.1 Describe the method that would need to be followed to attempt to remove an item from a circular queue implemented as a static data structure using an array. Your method should deal appropriately with any issues which could arise. [4 marks] 2.2 Describe three differences between dynamic and static data structures. [3 marks] Figure 1 shows data that has been stored in a stack implemented using an array S. Figure 1 [7] [6] [5] [4] [3] [2] Jib Top = 2 [1] Skye [0] Harry 2.3 What value will be returned by applying the peek operation to S? [1 mark] 2.4 What value will be returned by applying the pop operation to S? [1 mark] 2.5 Explain how a single stack can be used to reverse the order of the items in a queue. [2 marks]