WorksheetsBCSC0006 - Quiz 4 - Linked List & Stacks
Total questions: 10
Worksheet time: 4mins
A LIFO ordering of elements could be which of the following?
List
Stack
Queue
None of the above
Which of these is a self-referential structure?
Linked-List
Array
Node
None of the above
What would be the time complexity of adding an element to the middle of a linked list?
O(n)
O(1)
O(n^2)
None of the above
Name the three functions of a stack data structure.
push, pop, peek
push, pop, pull
push, pop, pow
none of the above
How many fields does the node of a singly linked list has?
1
2
3
4
What would the next of the last node of a circular linked list return?
head
tail
null
none of the above
What is a "Stack-Underflow"?
an empty stack
a full stack
a half-full stack (or half-empty😂)
none of the above
If a linked list has a head node and 5 other data nodes, what would the size of the linked list return?
5
6
none of the above
both
The doubly linked list would have how many fields in a node?
1
2
3
4
Which is the correct code to acess the second node in a linked list?
head.getData()
head.getNext().getData()
head.getNext().getNext().getData()
none of the above
