change dir for Maximum sumarray to dp