Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

BCSC0006 - Quiz 4 - Linked List & Stacks

Total questions: 10

Worksheet time: 4mins

Name
Class
Date
1.

A LIFO ordering of elements could be which of the following?

a)

List

b)

Stack

c)

Queue

d)

None of the above

2.

Which of these is a self-referential structure?

a)

Linked-List

b)

Array

c)

Node

d)

None of the above

3.

What would be the time complexity of adding an element to the middle of a linked list?

a)

O(n)

b)

O(1)

c)

O(n^2)

d)

None of the above

4.

Name the three functions of a stack data structure.

a)

push, pop, peek

b)

push, pop, pull

c)

push, pop, pow

d)

none of the above

5.

How many fields does the node of a singly linked list has?

a)

1

b)

2

c)

3

d)

4

6.

What would the next of the last node of a circular linked list return?

a)

head

b)

tail

c)

null

d)

none of the above

7.

What is a "Stack-Underflow"?

a)

an empty stack

b)

a full stack

c)

a half-full stack (or half-empty😂)

d)

none of the above

8.

If a linked list has a head node and 5 other data nodes, what would the size of the linked list return?

a)

5

b)

6

c)

none of the above

d)

both

9.

The doubly linked list would have how many fields in a node?

a)

1

b)

2

c)

3

d)

4

10.

Which is the correct code to acess the second node in a linked list?

a)

head.getData()

b)

head.getNext().getData()

c)

head.getNext().getNext().getData()

d)

none of the above