DS 1 Long quiz

DS 1 Long quiz

University

20 Qs

quiz-placeholder

Similar activities

Q4. Entity Relationship Modelling

Q4. Entity Relationship Modelling

University

15 Qs

Python Loop

Python Loop

University

15 Qs

C++ Functions Quiz

C++ Functions Quiz

University

23 Qs

DATA STRUCTUIR Quiz1 (AIML)

DATA STRUCTUIR Quiz1 (AIML)

University

20 Qs

Bài 27

Bài 27

10th Grade - University

15 Qs

QUIZ Oficina de introdução a BD

QUIZ Oficina de introdução a BD

University

16 Qs

IT-WS06 (Lesson 2)

IT-WS06 (Lesson 2)

University

15 Qs

DSA (QUIZ 7) -Greedy Algorithms and Complexity Analysis

DSA (QUIZ 7) -Greedy Algorithms and Complexity Analysis

University

15 Qs

DS 1 Long quiz

DS 1 Long quiz

Assessment

Quiz

Information Technology (IT)

University

Hard

Created by

seven castueras

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the minimum number of moves required to solve a Tower of Hanoi problem with 4 disks?

15

31

7

16

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the recurrence relation for the Tower of Hanoi problem?

T(n) = 2T(n-1) + 1

T(n) = T(n-1) + T(n-2)

T(n) = 3T(n-1) + 1

T(n) = 2n

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

If there are 3 rods in the Tower of Hanoi, what is the role of the third rod?

It holds the largest disk.

It serves as a temporary storage to move disks.

It is unused.

It holds disks permanently.

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the time complexity of the Tower of Hanoi problem for n disks?

O(n)

O(2^n)

O(n^2)

O(log n)

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

In the Tower of Hanoi, what is the key constraint for moving disks?

No two disks can be on the same rod.

A larger disk cannot be placed on a smaller disk.

Disks can only be moved one at a time.

Both b and c.

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How many distinct lines can be formed by 4 points on a plane if no three points are collinear?

4

6

7

8

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the recurrence relation used to calculate the maximum number of regions formed by n lines in a plane?

R(n) = R(n-1) + n

R(n) = R(n-1) + 2^n

R(n) = 2R(n-1) + 1

R(n) = n^2

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?