public void mDisplayLCS()
    {
        System.out.println("Length of Longest Common Sequence is "+
                            length[seq1.length-1][seq2.length-1]);

        LinkedList<Integer> list = new LinkedList<Integer>();
        int row = seq1.length-1, col = seq2.length - 1, temp = -1, index = -1;
        while ((row != 0) && (col != 0)) {

            if ((seq1[row] == seq2[col]) && (length[row][col] == (length[row-1][col-1]+1))) {
                list.addFirst(seq1[row]);
                row--;
                col--;
            } else if (length[row][col] == length[row-1][col]) {
                row--;
            } else {
                col--;
            }
        }
        Integer i = list.poll();

        while (i != null) {
            System.out.print(i);
            i = list.poll();
        }

        System.out.println();
    }