Skip to content

Commit

Permalink
Merge branch 'main' of github.com:IUDataStructuresCourse/course-web-p…
Browse files Browse the repository at this point in the history
…age-fall-2024
  • Loading branch information
HalflingHelper committed Dec 6, 2024
2 parents 31a13a7 + 248e6c0 commit 1448c62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ Nov. 8 | |
Nov. 11 | [Shortest Paths](./lectures/shortest-paths.md) | Ch. 9 sec. 3 | Connected Components due
Nov. 13 | [Union Find](./lectures/union-find.md) | Ch. 8
Nov. 15 | | | Project: [Routing Wires](./RoutingWires)
Nov. 18 | Minimum Spanning Tree | Ch. 9 sec. 5
Nov. 20 | Dynamic Programming | Ch. 10, sec. 3
Nov. 22 | | | Project: Routing Wires, cont'd
Nov. 18 | [Minimum Spanning Tree](./lectures/minimum-spanning-tree.md) | Ch. 9 sec. 5
Nov. 20 | [Dynamic Programming](./lectures/dynamic-programming.md) | Ch. 10, sec. 3
Nov. 22 | | | Project: Routing Wires, cont'd (Quiz in Lab)
Nov. 24 - Dec. 1 | **Thanksgiving Break**
Dec. 2 | DNA Alignment | | Routing Wires due
Dec. 4 | More Dynamic Programming
Dec. 2 | [DNA Alignment](./lectures/DNA-alignment.md) | | Routing Wires due
Dec. 4 | [More Dynamic Programming](./lectures/more-dynamic-programming.md)
Dec. 6 | | | Lab: [DNA Sequence Alignment](./DnaAlignment.md) | [code](https://autograder.luddy.indiana.edu/web/project/1306), [test](https://autograder.luddy.indiana.edu/web/project/1318)
Dec. 9 | Code Review (Routing Wires) | | DNA Sequence Alignment due
Dec. 11 | Review for Final Exam
Expand Down
5 changes: 3 additions & 2 deletions lectures/DNA-alignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,14 @@ Return the max of all the choices.
## Subproblem identification

Instead of using the entire rest of X and Y as the inputs to the
recursive function, we can simply use two indices, i and j, to mark
recursive function, we can simply use two integers, i and j, to mark
how far into X and Y we currently are, that is, which prefix of X and
Y correspond to the current subproblem.

## Memoization

To memoize the results, we can use a 2D table indexed by i and j.
To memoize the results, we can use a 2D table indexed by i and j, the
length of the prefix of X and Y.

T[0][0] = 0
T[0][j] = j * -1 for j = 1...|Y|
Expand Down

0 comments on commit 1448c62

Please sign in to comment.