L5 LinkedLists, Vector and Stacks Quiz

L5 LinkedLists, Vector and Stacks Quiz

University

15 Qs

quiz-placeholder

Similar activities

Data Structures

Data Structures

University

20 Qs

Array

Array

University

12 Qs

Launchpad programming - day 3 morning (JS)

Launchpad programming - day 3 morning (JS)

University

10 Qs

Data Structures and Algorithms Quiz

Data Structures and Algorithms Quiz

University

20 Qs

DSA5541 Quiz 1 TRI 2210

DSA5541 Quiz 1 TRI 2210

University

20 Qs

FSWD_CSS_1

FSWD_CSS_1

University

15 Qs

CC-103 Quiz #1

CC-103 Quiz #1

University

15 Qs

Stack

Stack

University

10 Qs

L5 LinkedLists, Vector and Stacks Quiz

L5 LinkedLists, Vector and Stacks Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Coder Warman

Used 1+ times

FREE Resource

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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?