I am getting wrong answer in the IDE but when i write on my editor i am getting correct answer…plz make changes necessary in code and the constraints are too large to fit inside a dp table plz look into it also
Exchanging Coins
@aryamaan1011
This is the modified code.
You were making two errors. First, the coin will be divided into n/2, n/3 and n/4 irrespective of whether n is divisible by any of 2, 3, or 4. Second store the values in dp map after you have computed them.
I hope this resolves your query. Please mark the doubt as resolved if it was able to answer your query.