Numbers in pi (dp)

code: https://ide.codingblocks.com/s/581452

please tell what is the mistake

hi. pls share the ques link.

Hi the website is a paid service so link won’t work but I have attached the photo that’s all there is to it in the website (all details of question are there in the photo itself)

if you need more info about the question please ask

Can u explain ur approach. what u are exactly trying to do. Ur code is currently giving some weird output
314159265 35897932384626433832 314159265358979323846 26433 8 -2147483648

I’m trying to find all the possible prefixes of the string which exists in the vector

as you can see these are the numbers in the vector, which my code is able to print, the task of the question is to make minimum cuts possible each time I make a cut I send the remaining string in the recursive call, and I’m also storing the minimum distance,

I don’t understand how I’m getting this in the output because the cuts have been made

So this problem is similar to https://leetcode.com/problems/word-break-ii/
u can once go through this code https://ide.codingblocks.com/s/581559

code: https://ide.codingblocks.com/s/581604
I think the code is almost working but the only problem is that the value of minCount is not changing,
in this case count itself is returning the correct value.

hi if the if(count < minCount) is true mincount will surely upadate

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.