int findMaximalActivitySet(int k, int s[], int f[])
	{
		int n = s.length;

		// find the next compatible activity
		int m;
		for (m = k + 1; m < n; m++)
			if (s[m] >= f[k])
				break;

		if (m < n)
		{
			maximalSet += m + " ";
			return 1 + findMaximalActivitySet(m, s, f);

		}
		return 0;
	}