12. Time complexity

12. Time complexity

Assessment

Quiz

Computers

University

Hard

Used 209+ times

FREE Resource

Student preview

quiz-placeholder

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image
What is the worst case running time of the above pseudo code?
O(2)
O(n)
O(n-2)
O(n2)

2.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image
What is the worst case running time of the above pseudo code?
O(n)
O(log n)
O(n log n)
O(n2)

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image
What is the worst case running time of the above pseudo code?
O(n)
O(log n)
O(n log n)
O(n2)

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image
What is the worst case running time of the above pseudo code?
O(n)
O(n log n)
O(n2)
O(n3)

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image
What is the worst case running time of the above pseudo code?
O(n)
O(n log n) 
O(n2)
O(n3)

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

The number of elements in the adjacency matrix of a graph having 6 vertices is __________.
7
14
36
49

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

For an adjacency matrix of an undirected graph, time complexity to find if there is an edge between 2 particular vertices is _________.
O(V)
O(E)
O(1)
O(V+E)

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?