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
36 questions
TEMA 3. Paqueteria y gestion de la documentacion

Quiz
•
University
40 questions
40 CONCENTRACION SIMULACRO 3.1

Quiz
•
University - Professi...
37 questions
test2

Quiz
•
University
38 questions
Final Exam Review

Quiz
•
University
40 questions
Design Thinking

Quiz
•
University
41 questions
Wearables & Neuromodulation Trivia Questions

Quiz
•
University
40 questions
Trabalho Gerenciamento de Riscos e Segurança no trabalho.

Quiz
•
University
41 questions
co khi dien luc 1- chuong 6( KN VỀ MÁY NÉN KHÍ)

Quiz
•
University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade