my algorithm for Scheduling Lectures, which is not working at all