I am unable to get the logic

I am unable to get on what criteria we will going to decide that person works on which activity what are the constraints on the person in a day

Hey @parmara8182
See this https://www.geeksforgeeks.org/activity-selection-problem-greedy-algo-1/

If your doubt is resolved please mark it as cleared.