I am getting tle and wrong answer in all test cases
Can you give some idea how to solve this question
Hey,you have to apply greedy algorithm and choose the number that gives you maximum number from right to left.
Hint:Make a custom compare function that somehow checks and return whether a number should come before or after another number.
I also did the same thing,i modified custom compare function
Hey,Please go through this link
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
@KetanPandey
This is duplicate thread so closing this Hey please correct this code and tell me my error
Discuss everyhting over there and please dont open multiple threads for same doubt 
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.