sample test case is running fine but while submitting the code none of the test case is passing . Please help with the code.
Activity Selection Problem
The concept that you are using is very vague. This problem can be solved greedily by sorting the activity on the basis of their ending time and then select the maximum number of activities possible.
Hope it Helps.