3 Test cases not passing .
Code link = https://ide.codingblocks.com/s/198122
Finding CB number - String - Launchpad
Hi @vyomgarg47,
I have updated ur code. Pls have a look at it and if something is not clear,pls post ur doubt her.
In this, it is better to start checking cb numbers from end.
eg.input=6922395, if we go acc to ur code and start from beginning, ur code will produce ans=2(from 692239 and 5) whereas ans should be 4 from (2,2,3,5).
Moreover, instead of just checking temp[i], try checking temp for all k from i to j just to ensure that some cases dont get missed.
please refer to above code.
Hope dis resolves ur doubt.
if anything is still not clear, pls post ur doubt here.