What is the time complexity of recursive_function?

General DSA Quiz

Quiz
•
Computers
•
Professional Development
•
Hard
Puneet Kansal
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
O(n)
O(n^2)
O(2^n)
O(log n)
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which of the following data structures provides O(1) average-time complexity for search operations?
Array
Linked List
Hash Table
Binary Search Tree
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the time complexity of inserting an element into a max heap of size n?
O(1)
O(log n)
O(n)
O(n log n)
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the time complexity of the Depth-First Search (DFS) algorithm in a graph with n vertices and m edges?
O(n)
O(m)
O(n + m)
O(n * m)
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
If an algorithm has a time complexity of O(n^2), which of the following is also true?
The algorithm has a time complexity of O(n^3)
The algorithm has a time complexity of Θ(n^2)
The algorithm has a time complexity of Ω(n)
All of the above
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
In an array of size n, what is the time complexity of inserting an element at the beginning?
O(1)
O(n)
O(log n)
O(n log n)
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the worst case time complexity to find an element that is not the largest in an unsorted array?
O(1)
O(n)
O(logn)
O(nlogn)
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
Searching and Sorting

Quiz
•
University - Professi...
25 questions
WOMANIA PRELIMS

Quiz
•
Professional Development
25 questions
ANALISE DE ALGORITMOS 2023

Quiz
•
Professional Development
20 questions
System and network support and management

Quiz
•
11th Grade - Professi...
15 questions
PowerShell 3.1-Tuberías (I)

Quiz
•
Professional Development
16 questions
GITHUB

Quiz
•
Professional Development
20 questions
Beamery JavaScript Pub Quiz

Quiz
•
Professional Development
15 questions
Javascript Datatypes and Variables(Kushal Das)

Quiz
•
Professional Development
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