Hello
I am doing this question from HackerEarth…
What i have done is for ecah test cases…
First i have sorted the coins value in descending order and then done the three steps
1.Picked the coin and didn’t move forward.
2.Picked the coin and move to next coin.
3.Didn’t picked coin and move to the next.
Thus i have calculated the minimum number of coin.
But i am getting tle in submission although i have done memoization.
This is my suggestion
Please look into it
https://www.hackerearth.com/submission/52059367/
Thanks