What is the time complexity to access an element at a given index in an array?

Time Complexity Quiz

Quiz
•
Other
•
University
•
Hard
Nathaniel Mensah
Used 1+ times
FREE Resource
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
O(1)
O(n)
O(log n)
O(n log n)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the worst-case time complexity for inserting an element at the beginning of a dynamic array (vector) of size n?
O(1)
O(log n)
O(n)
O(n²)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity for inserting a node at the head of a singly linked list?
O(1)
O(n)
O(log n)
O(n log n)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the worst-case time complexity for searching an element in a singly linked list?
O(1)
O(n)
O(log n)
O(n log n)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity for push and pop operations in a stack (whether implemented using an array or linked list)?
O(1)
O(n)
O(log n)
O(n log n)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a queue implemented with a linked list, what is the time complexity for both enqueue and dequeue operations?
O(1)
O(n)
O(log n)
O(n log n)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a hash table using chaining, what is the average-case time complexity for search operations?
O(1)
O(n)
O(log n)
O(n log n)
Create a free account and access millions of resources
Similar Resources on Quizizz
40 questions
QUIZ - LINUX for Cybersecurity & Network Security Basics

Quiz
•
University
37 questions
Parcial Anatomía 1

Quiz
•
University
45 questions
Tsukunomey

Quiz
•
University
35 questions
physical pharmacy

Quiz
•
University
35 questions
Take Flight Jet Book 1

Quiz
•
6th Grade - University
40 questions
Codestorm - Kriya 2025

Quiz
•
University
40 questions
Database Systems Final Exam

Quiz
•
University
45 questions
CS6515 Exam 2

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade