Dynamic Programming part 1

Dynamic Programming part 1

University

10 Qs

quiz-placeholder

Similar activities

CSC305: TOPIC 7

CSC305: TOPIC 7

University

15 Qs

XII Samacheer Computer Science

XII Samacheer Computer Science

12th Grade - University

10 Qs

GDSC event 16th-march-2024

GDSC event 16th-march-2024

University

12 Qs

E4-DAA

E4-DAA

University

10 Qs

CC 04 - Quiz 1

CC 04 - Quiz 1

University

10 Qs

H466 - Arrays, Records, Tuples and Lists

H466 - Arrays, Records, Tuples and Lists

11th Grade - University

10 Qs

CIS11 Quiz 3 Review SPR

CIS11 Quiz 3 Review SPR

University

15 Qs

hashing+fracKnapsack

hashing+fracKnapsack

University

12 Qs

Dynamic Programming part 1

Dynamic Programming part 1

Assessment

Quiz

Computers

University

Hard

Created by

Nguyễn Anh

Used 6+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Which of the following standard algorithms is not Dynamic Programming based.

Bellman–Ford Algorithm for single source shortest path

Floyd Warshall Algorithm for all pairs shortest paths

0-1 Knapsack problem

Prim's Minimum Spanning Tree

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

We use dynamic programming approach when

We need an optimal solution

The solution has optimal substructure

The given problem can be reduced to the 3-SAT problem

It's faster than Greedy

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

A greedy algorithm can be used to solve all the dynamic programming problems.

True

False

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Dynamic programming problems require making a sequence of interrelated decisions, where each decision corresponds to one stage of the problem.

True

False

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Time complexity of longest common sub string using DP is

O(n*m)

O(n+m)

O(n/m)

O(n-m)

6.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Dynamic programming problems always have a finite number of states

False

True

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Let two strings A="BanHocVoNguToi11Gio" and B="HocVoGiHocHoai".

Find LCS(A, B)

6

9

8

12

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?