Dynamic Programming Quiz

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Which of the following problems is NOT solved using dynamic programming? A. 0/1 knapsack problem B. Rod-cutting problem C. nth Fibonacci number D. Fractional knapsack problem

0/1 knapsack problem

When a top-down recursive approach of dynamic programming is applied to a problem, it usually

Decreases the time complexity and increase the space complexity

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

False

If a problem can be solved by combining optimal solutions to non-overlapping problems, the strategy is called?

Greedy Algorithms

In dynamic programming, the technique of storing the previously calculated values is called

Memoization

Naive recursion Fibonacci runs in?

O(2^n) : Exponential

What is the running time of the procedure CUT-ROD. It is given that the procedure CUT-ROD takes as input an array p[1......n] of prices and an integer n, and it returns the maximum revenue possible for a rod of length n

O(2^n) : Exponential

While computing the nth Fibonacci number using recursion, How many distinct recursive calls are made?

O(2^n) : Exponential

What is the running time of bottom up dynamic programming approach to Fibonacci

O(n)

If a problem can be broken into subproblems which are reused several times, the problem possesses __________________ property

Overlapping Subproblems

Naive recursion Fibonacci recurrence relation

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


संबंधित स्टडी सेट्स

Topic 16.3: Successes and Setbacks

View Set

American Red Cross first Aid test A

View Set

Pharmacology/Parenteral Therapy A/B/C

View Set

Readiness Exam Questions NCLEX-RN

View Set

Psychology of Gender Multiple Choice

View Set

full ace pt exam quiz 1 (from tests.com)

View Set

English A: Preparing for Test Unit 4

View Set

1. Perform Stakeholder Analysis (Element) - Plan Stakeholder Engagement - BA Planning and Monitoring

View Set