Improve overlap detection algorithm.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Assign higher difficuly to tasks with overlapping models.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>