What is the time complexity for accessing an element in an array?

Data Structures Quiz

Quiz
•
Other
•
University
•
Hard
Nathaniel Mensah
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
O(1)
O(log n)
O(n^2)
O(n)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity for searching an element in a queue?
O(log n)
O(n)
O(1)
O(n^2)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity for inserting an element at the end of a dynamic array?
O(log n)
O(n^2)
O(1)
O(n)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity for deleting an element from the middle of an array?
O(1)
O(n)
O(n^2)
O(log n)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity for searching an element in a stack?
O(n)
O(n^2)
O(1)
O(log n)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the average time complexity for searching in a balanced binary search tree?
O(n)
O(n^2)
O(1)
O(log n)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the time complexity for adding an edge in an adjacency list representation of a graph?
O(log n)
O(n^2)
O(1)
O(n)
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Computational Thinking for Problem Solving

Quiz
•
University
10 questions
Algorithm Quizz 2

Quiz
•
University
17 questions
Python Review Module 16 - Searching Sorting Algorithm

Quiz
•
University
12 questions
Searching Quiz

Quiz
•
University
15 questions
Data Structure & Algorithm

Quiz
•
University
17 questions
MapReduce quiz

Quiz
•
University
10 questions
Exploring Sorting Algorithms

Quiz
•
University
11 questions
Grand Quiz Section-I

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