public void computeLCS()
    {
        int diag = 0;
        for (int i = 1; i < seq1.length; i++) {
            diag = 0;
            for (int j = 1; j < seq2.length; j++) {
                diag = length[j];
                if (seq1[i] == seq2[j]) {
                    length[j] = length[j] + 1;
                } else if (length[j] < length[j-1]) {
                    length[j] = length[j-1];
                }
            }
        }
    }