Answer it
P2 b134 stack linked list
5 marksYou mark it yourself against the marking points
The school code editor's bracket checker keeps its stack in a Python list (in Java, an ArrayList). The checker only ever uses the stack through three operations: push, pop, and a test for whether the stack is empty. A developer wants to change the stack so that it is stored as a singly linked list instead, with the head of the list as the top of the stack.
(a) Describe how push and pop would work on this singly linked list. [3]
(b) Explain why the bracket-checking code would not need to change, as long as push, pop and the empty test still do the same job. [2]
[5]