Longest Common Subsequence

UVa-10405, O(n^2) running time and O(n) space