Ugly numbers dp

test case failing while submitting

code link -
https://ide.codingblocks.com/s/71205

kindly tell the mistake i am doing…

Hi Tanay,
the problem is that the multipication thing will come inside the if statement and you have to modify your code according to that.
int q1 = ugly[i2]*2;
int q2 = ugly[i3]*3;
int q3 = ugly[i5]*5;
the code will be modified accordingly.
if this doesn’t help then you ask again.

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.