10.4 Introduction to abstract data types
27 questions in this subtopic. Open a question to solve it and check the official answer.
Introduction to abstract data types · 0 marks · official answer ready
(i) Complete the answer column in the following table: Answer the memory location of the value that has been on the stack for the longest time the number of consecutive push opera…
Introduction to abstract data types · 3 marks · official answer ready
(ii) The diagram shows the current state of the stack. Stack Memory Value location 409 408 407 'A' TopOfStack 406 'C' 405 'F' 404 'K' 403 'B' 402 'S' 401 'R' 400 'D' The following…
Introduction to abstract data types · 1 mark · official answer ready
12 (a) An array is an Abstract Data Type (ADT). Identify two other ADTs. 1 ........................................................................................................…
Introduction to abstract data types · 3 marks · official answer ready
(a) Describe the linked list immediately after initialisation, before any data items are added. ...................................................................................…
Introduction to abstract data types · 0 marks · official answer ready
(a) The stack is implemented using two variables and a 1D array of 8 elements as shown. The variables are used to reference individual elements of the array, in such a way that: •…
Introduction to abstract data types · 10 marks · official answer ready
(ii) Suggest a more appropriate Abstract Data Type that could be used to store the messages that would not have the same problem. .................................................…
Introduction to abstract data types · 10 marks
10 A stack is to be set up using the information in the table. Identifier Data type Description BasePointer INTEGER points to the bottom of the stack TopPointer INTEGER points to …
Introduction to abstract data types · 2 marks · official answer ready
10 A stack is to be set up using the information in the table. Identifier Data type Description BasePointer INTEGER points to the bottom of the stack TopPointer INTEGER points to …
Introduction to abstract data types · 2 marks · official answer ready
(i) Study the pseudocode in part (a)(ii) and complete the table of identifiers by writing the missing data types and descriptions. Identifier Data type Description BasePointer Top…
Introduction to abstract data types · 2 marks · official answer ready
(b) Justify the use of a linked list instead of an array to implement a stack. ....................................................................................................…
Introduction to abstract data types · 10 marks
10 A stack is to be set up using the information in the table. Identifier Data type Description BasePointer INTEGER points to the bottom of the stack TopPointer INTEGER points to …
Introduction to abstract data types · 2 marks · official answer ready
10 A stack is to be set up using the information in the table. Identifier Data type Description BasePointer INTEGER points to the bottom of the stack TopPointer INTEGER points to …
Introduction to abstract data types · 0 marks
(a) The diagram below represents an Abstract Data Type (ADT) implementation of the queue. Each data item is stored in a separate location in the data structure. During initial des…
Introduction to abstract data types · 3 marks · official answer ready
(a) Write the pseudocode to declare MaxSize, FrontPointer, RearPointer, Length and Queue. .........................................................................................…
Introduction to abstract data types · 4 marks · official answer ready
(c) Explain how a new element can be added to the queue if it is implemented using two stacks. ....................................................................................…
Introduction to abstract data types · 5 marks · official answer ready
(ii) Complete the given pseudocode. [5] 14
Introduction to abstract data types · 3 marks · official answer ready
(b) Explain the reasons why a queue ADT works better than a stack ADT in organising print jobs. ...................................................................................…
Introduction to abstract data types · 3 marks · official answer ready
(a) Write the pseudocode to declare MaxSize, FrontPointer, RearPointer, Length and Queue. .........................................................................................…
Introduction to abstract data types · 4 marks · official answer ready
(c) Explain how a new element can be added to the queue if it is implemented using two stacks. ....................................................................................…
Introduction to abstract data types · 3 marks · official answer ready
(a) A stack is an example of an Abstract Data Type (ADT). Identify one other example of an ADT and describe its main features. Example ............................................…
