Now finds the best path with minimum time

calculates the time taken for generation of the schedules