def latest_no_overlap(jobs, n):
	"""
	Find the job before the nth job which does not
	overlap with the nth job

	Return -1 if no such job found
	"""
	for j in range(n - 1, -1, -1):
		if jobs[j][1] <= jobs[n][0]:
			return j;
	return -1;