May/June 2026 Paper 22

2026 · 6 questions · 26 parts · 75 marks

0/75 marks
0Correct0Partial0Wrong26Unattempted
Filters0 active
4(a) — group 1Stacks QueuesMedium2 marks
A desktop web browser stores the history of web addresses visited.
The web browser uses a back button and forward button to move between web pages recently visited.
Two stacks are used when each of these buttons are clicked: a back stack and a forward stack.
The back button is clicked to return to a previously visited web page. The back button operates as follows:
  • The web address currently being displayed by the browser is pushed onto the forward stack.
  • The web address from the top of the back stack is popped.
  • The web address popped is loaded by the web browser.
The forward button is clicked to revisit a web page previously visited. The forward button operates as follows:
  • The web address currently being displayed by the browser is pushed onto the back stack.
  • The web address from the top of the forward stack is popped.
  • The web address popped is loaded by the web browser.
The current state of the two stacks (TOS marks the top of stack; positions above TOS are empty):
Current state of the two stacks
position (top → bottom)back stackforward stack
1
2
3www.333.corp (TOS)
4www.zzz.corp (TOS)www.111.home
5www.aaa.homewww.999.corp
6www.ccc.mywww.222.me
The current web address being displayed by the web browser is: www.bbb.home
The browsing session continues; the buttons are clicked in sequence in three groups:
Groups of button clicks
groupbuttons clicked, in order
group 1back button
group 2forward button
group 3forward button, forward button, forward button
State the contents of the back stack and the forward stack, each with its TOS pointer, and the web address currently displayed by the browser, after group 1 (one click of the back button).
PositionBack stackBack TOSForward stackForward TOS
1
2
3
4
5
6
Web address displayed
4(a) — group 2Stacks QueuesMedium1 mark
Continuing from the state reached after group 1, state the contents of both stacks (with their TOS pointers) and the web address currently displayed, after group 2 (one click of the forward button).
PositionBack stackBack TOSForward stackForward TOS
1
2
3
4
5
6
Web address displayed
4(a) — group 3Stacks QueuesHard3 marks
Continuing from the state reached after group 2, state the contents of both stacks (with their TOS pointers) and the web address currently displayed, after group 3 (three clicks of the forward button, one after another).
PositionBack stackBack TOSForward stackForward TOS
1
2
3
4
5
6
Web address displayed
4(b)Stacks QueuesMedium3 marks
A stack is an Abstract Data Type (ADT).
Identify one other ADT and describe two features of that ADT.
Name of the ADT
Two features of that ADT
0 words