Activity selection problem:


why is this code showing wrong submission and compilation is correct with output, so whats the problem! please resolve.

Hi @aditi2512201012019,
try modifying ur code and updating ur logic.
if input is like [(1,3),(4,6),(4,5)], output should be 2 but ur code gives 3.
HINT. sort the pair(strt time,end time) on basis of endtime.
Hope dis helps.
if u sill face any issue, post ur doubt here.