Skip to content

Commit 6329ece

Browse files
author
Hamid Gasmi
committed
Related problems are added to Dynamic Programming
1 parent ff64284 commit 6329ece

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@
471471
- taking an element of maximum value per unit of weight is not safe!
472472
- Related Problems:
473473
- [Money Change II](https://github.com/hamidgasmi/training.computerscience.algorithms-datastructures/issues/13)
474+
- [Money Change III](https://github.com/hamidgasmi/training.computerscience.algorithms-datastructures/issues/168)
474475
- [Primitive Calculator](https://github.com/hamidgasmi/training.computerscience.algorithms-datastructures/issues/14)
475476
- [Computing the Edit Distance Between 2 Strings](https://github.com/hamidgasmi/training.computerscience.algorithms-datastructures/issues/15)
476477
- [Longest Common Subsequence of 2 Sequences](https://github.com/hamidgasmi/training.computerscience.algorithms-datastructures/issues/16)
@@ -4479,6 +4480,41 @@
44794480

44804481
</details>
44814482

4483+
<details>
4484+
<summary>Longest Common substring between 2 Strings</summary>
4485+
4486+
- It's the matches in the alignment of 2 strings
4487+
- It's equivalent to the [Manhattan Tourist Problem](https://github.com/hamidgasmi/training.computerscience.algorithms-datastructures/issues/167)
4488+
- Every column of the alignment matrix, it's code with an arrow
4489+
- A T - G T T A T A
4490+
A T C G T - C - C
4491+
↘ ↘ → ↘ ↘ ↓ ↘ ↓ ↘
4492+
4493+
A T C G T C C
4494+
x---x---x---x---x---x---x---x
4495+
A | ↘
4496+
x---x---x---x---x---x---x---x
4497+
T | ↘
4498+
x---x---x → x---x---x---x---x
4499+
G | ↘
4500+
x---x---x---x---x---x---x---x
4501+
T | ↘
4502+
x---x---x---x---x---x---x---x
4503+
T | ↓
4504+
x---x---x---x---x---x---x---x
4505+
A | ↘
4506+
x---x---x---x---x---x---x---x
4507+
T | ↓
4508+
x---x---x---x---x---x---x---x
4509+
A | ↘
4510+
x---x---x---x---x---x---x---x
4511+
- We need to travel optimal ways in the graph
4512+
- ↘ = 1 if its corresponding symbols match
4513+
- ↘ = 0 if its corresponding symbols don't match
4514+
- It's also equivalent to
4515+
4516+
</details>
4517+
44824518
---
44834519

44844520
## References

0 commit comments

Comments
 (0)