10.4 Introduction to abstract data types
15 questions in this subtopic. Open a question to solve it and check the official answer.
Introduction to abstract data types · 3 marks · official answer ready
(i) The following sequence of six data values are stored into Queue-A: Show on the diagram below the contents of Queue-A and its pointers at this stage (Stage 1). [3] 4XHXH$ 6WDFN…
Introduction to abstract data types · 2 marks · official answer ready
(ii) All the contents of Queue-A are then removed and placed on Stack-B. Show on the diagram above, the contents of Stack-B and its pointer at this stage (Stage 2). [2]
Introduction to abstract data types · 2 marks · official answer ready
(iii) Three items are removed from Stack-B and stored in Queue-A. Show on the diagram above the final contents of Queue-A and its pointers at this stage (Stage 3). [2]
Introduction to abstract data types · 1 mark · official answer ready
(iv) All the remaining items on Stack-B are removed and stored in Queue-A. Comment on the final contents of Queue-A. ..............................................................…
Introduction to abstract data types · 2 marks · official answer ready
(i) Show on the diagram below, the contents of Stack-A and its pointer at this stage (Stage 1). [2] The contents of Stack-A are then removed and placed on Queue-B.
Introduction to abstract data types · 3 marks · official answer ready
(ii) Show on the diagram below, the contents of Queue-B and its pointers at this stage (Stage 2). [3] Three items are removed from Queue-B and input to Stack-A.
Introduction to abstract data types · 2 marks · official answer ready
(iii) Show on the diagram below, the contents of Stack-A and its pointer at this stage (Stage 3). [2] Stack-A Queue-B Stack-A 20 20 20 7 7 7 6 6 6 5 5 5 4 4 4 3 3 3 2 2 2 1 1 1 St…
Introduction to abstract data types · 1 mark · official answer ready
(iv) Three more items are removed from Queue-B and placed on Stack-A. Comment on the final contents of Stack-A. ...................................................................…
Introduction to abstract data types · 3 marks · official answer ready
(d) Explain why the choice of a stack data structure for this application is a poor choice. For Suggest an alternative data structure. Examiner's Use [3]
Introduction to abstract data types · 5 marks · official answer ready
(b) Explain how interrupts are dealt with by a processor and how interrupted jobs may later be resumed. [5]
Introduction to abstract data types · 2 marks · official answer ready
(ii) Give one advantage and one disadvantage of using a linked list structure to store a queue rather than using an array structure. [2]
Introduction to abstract data types · 3 marks · official answer ready
(iii) Explain why a linked list is a more sensible structure than an array for storing a stack. [3] The remaining questions refer to the following information. A large store has a…
Introduction to abstract data types · 2 marks · official answer ready
(a) State two reasons why it would be preferable to store the queue in a linked list rather than an array. [2]
Introduction to abstract data types · 0 marks · official answer ready
(i) static,
Introduction to abstract data types · 4 marks · official answer ready
(ii) dynamic data structure, giving an advantage of each. [4]
