Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data...
Transcript of Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data...
![Page 1: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/1.jpg)
ContentsQuestions..............................................................................................................................................2
Q1. Stacks and Queues......................................................................................................................2
Q2 – Searching algorithms.................................................................................................................3
Q3 – Data types.................................................................................................................................4
Q4 – Control Structure.......................................................................................................................4
Q5 – Control Structure.......................................................................................................................4
Q6 – Control Structure.......................................................................................................................4
Q7 - Functions....................................................................................................................................4
Q8 - Variables....................................................................................................................................4
Q9 - Errors.........................................................................................................................................5
Q10 - Errors.......................................................................................................................................5
Q11 - Flowchart.................................................................................................................................6
Q12 – Client/Server...........................................................................................................................6
Q13 – Client/Server...........................................................................................................................7
Mark Scheme.........................................................................................................................................7
M1. –Stacks and queues....................................................................................................................7
M2. Searching algorithm...................................................................................................................7
M3 – Data Type.................................................................................................................................8
M4 – Control Structure......................................................................................................................8
M5 – Control Structure......................................................................................................................8
M6 – Control Structure......................................................................................................................8
M7 - Functions...................................................................................................................................9
M8 - Variables....................................................................................................................................9
M9 - Errors.........................................................................................................................................9
M10 - Errors.....................................................................................................................................10
M11 - Flowchart..............................................................................................................................10
M12 – Client/Server.........................................................................................................................11
M13 – Client/Server.........................................................................................................................11
![Page 2: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/2.jpg)
QuestionsQ1. Stacks and Queues
(a) In the context of data structures what is meant by the terms:
(i) FIFO; ....................................................................................................
(ii) LIFO? ...................................................................................................(2)
(b) Queue and stack are examples of data structures. Tick in the following table to indicate whether they are FIFO or LIFO data structures.
FIFO LIFO
Queue
Stack
(2)
(c) Describe one example of the use of a stack.
.......................................................................................................................
.......................................................................................................................
.......................................................................................................................(2)
![Page 3: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/3.jpg)
Q2 – Searching algorithmsA computer program stores a list of integers in an array named List. The numbers in the array are to be sorted into ascending order so that a particular efficient search algorithm can be used to search for a number.
(a) One of the search algorithms in Table 1 can only be used successfully on a sorted list.
Place one tick next to the name of the algorithm that requires a list to be sorted.
Table 1
Algorithm NameRequires Sorted
List?(Tick one box)
Binary search
Linear search
(1)
![Page 4: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/4.jpg)
Q3 – Data types
Q4 – Control Structure
Q5 – Control Structure
Q6 – Control Structure
Q7 - Functions
Q8 - Variables
![Page 5: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/5.jpg)
Q9 - Errors
Q10 - Errors
![Page 6: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/6.jpg)
Q11 - Flowchart
Q12 – Client/Server
![Page 7: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/7.jpg)
Q13 – Client/Server
Mark Scheme
M1. –Stacks and queues(a) (i) First In First Out;
or by description
(ii) Last In First Out;or by description
2
(b)
FIFO LIFO
Queue
Stack
2
(c) Reverse the contents of a queue/list;Push all contents of queue/list onto stack then pop them off into a new queue/list;Procedure/function calls;Local variables;Parameters;Return Address;Volatile environment; A register contents State 1 Describe 1
2
M2. Searching algorithm(a)
Algorithm Name Requires SortedList? (Tick one box)
![Page 8: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/8.jpg)
Binary search
Linear search
1 mark for having a tick in the "Binary search" row.A alternative indicators for tick eg "Yes"A a tick for "Binary search" and a cross for "Linear search"R answers where two ticks have been used.
M3 – Data Type1
M4 – Control Structure
M5 – Control Structure
M6 – Control Structure
![Page 9: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/9.jpg)
M7 - Functions
M8 - Variables
M9 - Errors
![Page 10: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/10.jpg)
M10 - Errors
M11 - Flowchart
![Page 11: Deyes High School - Questions · Web viewQ1. Stacks and Queues (a) In the context of data structures what is meant by the terms: (i) FIFO; ..... A computer program stores a list of](https://reader036.fdocuments.us/reader036/viewer/2022081023/5e70356eb163577aad52ddd7/html5/thumbnails/11.jpg)
M12 – Client/Server
M13 – Client/Server