dynamictestprep

pdf

School

University of Massachusetts, Amherst *

*We aren’t endorsed by this school

Course

311

Subject

Computer Science

Date

Jan 9, 2024

Type

pdf

Pages

1

Uploaded by ChefFang12799

Report
Dynamic Programming Test Question 1: Fibonacci Sequence Write a dynamic programming algorithm to compute the n th Fibonacci number. Discuss the time and space complexity of your solution. Question 2: Longest Common Subsequence Describe an algorithm to find the longest common subsequence (LCS) of two strings. What is the time complexity of your algorithm? Question 3: 0/1 Knapsack Problem Explain the dynamic programming solution to the 0/1 Knapsack problem. What are the time and space complexities? Question 4: Coin Change Problem Describe an algorithm to find the minimum number of coins needed to make up a given amount. Assume you have an infinite supply of each coin denomination. 1
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help