wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

2.3.2. Algorithms for the Main Data Structures

Total questions: 8

Worksheet time: 4mins

Name
Class
Date
1.
Are stacks FIFO or FILO?
a)
FILO
b)
FIFO
c)
LIFO
d)
LILO
2.
Which function adds an item to a stack?
a)
Push
b)
Pop
c)
Ollie
d)
Nollie
3.
Which function removes an element from a stack?
a)
Pop
b)
Kickflip
c)
Backflip
d)
Stick Shift
4.
What is the significance of the back pointer in the array representation of a queue?
a)
Holds the location of the next available space in the queue
b)
Last item in the list
c)
Used for backtracking
d)
First item in the list
5.
Which function returns the item at the front of a queue without removing it?
a)
Peek
b)
Snoop
c)
Glance
d)
Show
6.
What is the purpose of the front pointer in the array representation of a queue?
a)
Points to the space containing the first item in the queue
b)
Points to the last item
c)
Points to open register
d)
Holds the location of the next available<br />space in the queue
7.
What value is the top pointer initialised to in the array representation of a stack?
a)
-1
b)
1
c)
0
d)
9B
8.
Are queues FIFO or FILO?
a)
FIFO
b)
FILO
c)
LIFO
d)
LILO