Professional Documents
Culture Documents
DFC30233
DATA
STRUCTURE
TOPIC CHAPTER 1 2 3 4
ASSESMENT EXERCISE 4
PROGRAMME DDTS5
INSTRUCTIONS :
1.Answer ALL the questions
2.Submit on ………………….
MARKING SCHEME
CLO2PPLO3
TOTAL /
Activity 4A
Activity Outcome: Define queue and the implementation of queue in real life
1.What is Queue?
Abstract data in database is a collection of items in which only the earliest added item may be
accessed
2.Give TWO example of queue in real life
Cashier line
bank
Activity 4B
Activity Outcome: Differentiate between linear implementation and circular array
Activity 4C
Activity Outcome: Explain the FIFO operation in queue
queue 0 1 2 3 4 5
70
80 90
front rear
Show the contents of the queue and the locations of front and rear after doing the
following instruction:
i. queue.dequeue( );
ii. queue.dequeue( );
iii. queue.enqueue(7);
iv. queue.enqueue(8); v.
queue.enqueue(9);
vi. queue.enqueue(10);
b)
NULL
Activity 4E
Activity Outcome: Apply queue in problem solving
1) Draw suitable Circular Queue diagram for each statement below. Show front,rear and count
according to related diagram.
a)Create CircularQueue(Q); Size = 3
b)enqueue(3,Q);
c)enqueue(7,Q);
d)dequeue(Q);
e)enqueue(9,Q);
f)IsEmpty(Q);
2) Draw suitable Circular Queue diagram for each statement below. Show front,rear and count
according to related diagram.
a)Create CircularQueue(T); Size = 5
b)enqueue(E,T);
c)enqueue(S,T);
d)enqueue(W,T);
e)dequeue(T);
f)enqueue(R,T);
g)enqueue(Z,T);
h)IsFull(T);