00:02
You can use dynamic programming for the longest common subsequent or lcs, and we're given the sequences, x equals a, b, c, b, d, d, a, b, c, a, b, c, a, and y is b, d, c, a, and we want the longest subsequent that appears in both x and y.
00:22
So you create a table where i is the length of prefix x and j is the length of prefix y, and this equals the length of prefix y.
00:36
Lcs and it gives the recurrence zero if i is zero or j is zero.
00:56
That would be if or the max, that would be if they are not equal...