Asap-Alap Scheduling Algorithm in C++