
L5 LinkedLists, Vector and Stacks Quiz
Authored by Coder Warman
Computers
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the time complexity of inserting an element at the head of a linked list?
O(n)
O(log n)
O(1)
O(n²)
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is true about linked lists?
Fixed size
Requires additional memory for pointers
Cannot store integers
Supports only one data type
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which method adds an element to the end of the linked list?
addFirst()
addLast()
insert()
prepend()
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What does the head node in a linked list store?
Data and a link to the next node
Only a link to the next node
Cannot store data
Data and a link to the previous node
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following is true about a vector?
Vector is synchronized
Vector is not thread-safe
Vector can only store primitive types
Vector does not allow null elements
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which of the following statements is true about a vector?
Vectors do not allow resizing
Vectors are synchronized
Vectors are immutable
Vectors cannot store strings
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which principle does a stack follow?
LIFO
FIFO
Random Access
Binary Search Tree
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?