DAA 2023- 2024 Test 2

DAA 2023- 2024 Test 2

1st Grade

50 Qs

quiz-placeholder

Similar activities

PRUEBA OBJETIVA MF1445_3

PRUEBA OBJETIVA MF1445_3

1st Grade

50 Qs

UF0320: Aplicaciones informáticas de tratamiento de textos

UF0320: Aplicaciones informáticas de tratamiento de textos

1st - 12th Grade

50 Qs

prawa i obowiązki pracownika

prawa i obowiązki pracownika

1st Grade

51 Qs

fotografia

fotografia

1st - 6th Grade

48 Qs

JUEGO

JUEGO

1st Grade

51 Qs

PKK XII OTKP

PKK XII OTKP

1st Grade

45 Qs

Censo Ecuador 2022

Censo Ecuador 2022

1st - 10th Grade

47 Qs

Clima Social Familiar x50 (2)

Clima Social Familiar x50 (2)

1st Grade

50 Qs

DAA 2023- 2024 Test 2

DAA 2023- 2024 Test 2

Assessment

Quiz

Other

1st Grade

Hard

Created by

Thiyagu Thiyagu

Used 17+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 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

30 sec • 1 pt

Time Complexity of this program:

def f():

a = 0

for i = 1 to n:

a += i;

b = 0

for i = 1 to m:

b += i;

O(n)

O(m)

O(n+m)

O(n*m)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of following code:

int a = 0;

for (i = 0; i < N; i++) {

for (j = N; j > i; j--) {

a = a + i + j;

}

}

O(N)

O(N*log(N))

O(N * Sqrt(N))

O(N*N)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of following code:

int i, j, k = 0;

for (i = n / 2; i <= n; i++) {

for (j = 2; j <= n; j = j * 2) {

k = k + n / 2;

}

}

O(n)

O(nLogn)

O(n^2)

O(n^2Logn)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the problems cannot be solved by backtracking method?

n-queen problem

subset sum problem

Hamiltonian circuit problem

travelling salesman problem

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Backtracking algorithm is implemented by constructing a tree of choices called as?

State-space tree


state chart tree

node tree

Backtracking tree

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following problems is similar to that of a Hamiltonian path problem?

Knapsack problem

closest pair problem

travelling salesman problem

assignment problem

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?