Dynamic Programming Flashcards

1
Q

Dynamic Programming

A

Dynamic programming is a problem-solving technique used to solve complex problems by breaking them down into simpler overlapping subproblems. Common examples include solving the Fibonacci series, the Longest Common Subsequence (LCS), and the Knapsack Problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Fibonacci Series

A

The Fibonacci Series is a sequence of numbers where each number is the sum of the two preceding ones, usually starting with 0 and 1. The sequence begins: 0, 1, 1, 2, 3, 5, 8, 13, and so on. Dynamic programming can be used to efficiently calculate Fibonacci numbers, avoiding redundant calculations by storing intermediate results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Longest Common Subsequence (LCS)

A

The Longest Common Subsequence (LCS) problem involves finding the longest subsequence that two sequences have in common. A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements. LCS is often used in text comparison, DNA sequence analysis, and other areas.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Knapsack Problem

A

The Knapsack Problem is a classic optimization problem. It involves selecting a subset of items from a given set, each with a weight and a value, to maximize the total value while not exceeding a predefined weight limit (the capacity of a knapsack). Dynamic programming is often used to solve this problem by considering whether to include each item in the knapsack or not.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Coin Change Problem

A

The Coin Change Problem is another optimization problem in dynamic programming. Given a set of coin denominations and a target amount of money, the goal is to find the minimum number of coins required to make up that amount. Dynamic programming can be used to solve this problem efficiently by considering different combinations of coins.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly