public TDLCS(String X, String Y)
	{
		// The definition of the recursive solution is dependent on the indexing
		// of the sequence starting from 1
		X = " " + X;
		Y = " " + Y;

		m = X.length() - 1; // length of sequence X
		n = Y.length() - 1; // length of sequence Y

		l = new int[X.length()][Y.length()];
		lcs = new String[X.length()][Y.length()];

		for (int i = 0; i <= m; i++)
			for (int j = 0; j <= n; j++)
			{
				if ( i == 0 || j == 0)
					l[i][j] = 0;
				else
					l[i][j] = Integer.MIN_VALUE;
				lcs[i][j] = "";
			}

		lengthLCS(X, Y, m, n);
	}