What is wrong with my code for the activity selection problem? It is not passing one test case.
Code link
https://www.codepile.net/pile/X8XwE1Mm
Wrong output for the activity selection problem
bro then sort function will not work
as arr is out of scope
thanks bro it got resolved.