Data types and structures
283 questions. Open a question to solve it and check the official answer.
Introduction to abstract data types · 3 marks · official answer ready
(a) There is one pointer: the top of stack pointer, which points to the last item added to the stack. Draw a diagram to show the final state of the stack after the following opera…
Introduction to abstract data types · 59 marks · official answer ready
(i) The CreateStack operation links all nodes and initialises the TopOfStackPointer and FreePointer. Complete the diagram to show the value of all pointers after CreateStack has b…
Introduction to abstract data types · 5 marks
(ii) The algorithm for adding a name to the stack is written, using pseudocode, as a procedure with the header PROCEDURE Push (NewName) Where NewName is the new name to be added t…
