there n different online course number 1 n you give array course coursesi durationi lastdayi indicate ith course take continuously durationi day finish lastDayiYou start 1st day course simultaneouslyreturn maximum number course Example 1input course 10020020013001000125020003200output 3explanation there totally 4 course 3 course mostFirst 1st course cost 100 day finish 100th day ready course 101st daysecond 3rd course cost 1000 day finish 1100th day ready course 1101st day Third 2nd course cost 200 day finish 1300th day the 4th course take finish 3300th day exceed close dateexample 2input course 12output 1example 3input course 3243output 0 Constraints1 courseslength 1041 durationi lastdayi 104