Unit 1 DAA

Unit 1 DAA

25 Qs

quiz-placeholder

Similar activities

Analysis and design of algorithms

Analysis and design of algorithms

12th Grade

22 Qs

Quantitative Aptitude Series

Quantitative Aptitude Series

University

20 Qs

Tech quiz-july

Tech quiz-july

University

20 Qs

Data Structures

Data Structures

University

20 Qs

Quick Quiz!

Quick Quiz!

10th - 12th Grade

23 Qs

Big-O Notation

Big-O Notation

12th Grade

26 Qs

Algorithm Analysis

Algorithm Analysis

University

21 Qs

data structures1

data structures1

University

20 Qs

Unit 1 DAA

Unit 1 DAA

Assessment

Quiz

Computers, Other

Hard

Created by

Prema Kadam

Used 1+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the time complexity of this code

int a = 0, i = N;

while (i > 0)

{

a += i;

i /= 2;

}

O(N)

O(Sqrt(N))

O(N / 2)

O(log N)

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The complexity of Binary search algorithm is

O(n)

O(log n)

O(n2)

O(n log n)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

A linear function takes the form

f(n) = an + b

f(n) = an2 +bn + c

f(n) = alog2n

f(n) = a + b

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Find the slowest algorithm:

O (n)

O (n^2)

O (n!)

O (2^n)

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The number of executions grows extremely quickly as the size of the input increases

Exponential Time

Linear Time

Polynomial Time

Constant Time

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does it mean when we say that an algorithm X is asymptotically more efficient than Y?

X will be a better choice for all inputs

X will be a better choice for all inputs except possibly small inputs

X will be a better choice for all inputs except possibly large inputs

Y will be a better choice for small inputs

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the main disadvantage of a binary search compared to a linear search?
It requires the data to be in order
It requires more memory
It does not execute as quickly with larger data sets
Not all CPUs are capable of executing the algorithm

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?