Skip to content

Commit

Permalink
Add the missing piece, the history (reason) behind the first empty ro…
Browse files Browse the repository at this point in the history
…w and column in the edit distance (match string) problem for the coursera's algorithmic toolbox's module 05 dynamic programming, programming assignment 01, problem number 03 | Edit Distance (Match String). | 050editDistanceMatchStrings.kt
  • Loading branch information
sagarpatel288 committed Dec 31, 2024
1 parent 246350f commit 264c647
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ package coursera.ucSanDiego.module05DynamicProgramming.module05ProgrammingAssign
*
* ### ----------------------- Visual References (Technical Explanation) -----------------------
*
* [History](https://youtu.be/d-Eq6x1yssU?si=QA9xUzBsNwIWI_ge)
*
* [Image](https://github.com/sagarpatel288/kotlinDSAWithIntellijIdea/blob/658890438ec5952058e296152c3d44fd66e8b2eb/res/coursera/ucSanDiego/module05DynamicProgramming/03editDistanceMatchString/003editDistance2dCalculation.png)
*
* #### ----------------------- Given Data -----------------------
Expand Down Expand Up @@ -441,6 +443,7 @@ fun main() {
// These cases are also known as initialization of the edit distance dynamic programming,
// which is mandatory for the correctness of the upcoming logic.
// In this sense, it is the base of the logic, and it is kind of a pre-computed key-lemma.
// This is indeed a part of the wagner-fischer process/formula.
for (i in 0..targetLength) {
// When `j` is 0, it indicates `0th` character, that is, an empty reference string.
operations[i][0] = i
Expand Down

0 comments on commit 264c647

Please sign in to comment.