public void displayLCS()
    {
        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)) {
            temp = indices[row] [col];
            if (temp < 0)
                index = -temp;
            else
                index = temp;

            if (temp > 0) 
                list.addFirst(seq1[row]);
            
            col = (((1<< POW) -1) & index) & 0x7FFFFFFF;
            row = index >> POW; 

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

        System.out.println();
    }