Critical Path Algorithm.