In the given Test case 81615 .
Substrings are 8,81,816,8161,81615,1,16,161,1615,6,61,615,1,15,5 and
according to question those number which are divisible by prime are not CB no and 0 and 1 are also not CB No.
So Possible CB no are 8161,61,5
but in question, it is mention that only 61,5 are CB No.
Please explain where I am doing a mistake ??
Finding CB Numbers
@ashwani225
hello Ashwani,
In string 8161 61 is there so if u consider 8161 as cb number then you should not consider 61 as cb number because it will overlap.
so u can either consider 8161 or 61 but not both.
basically u need to find maximum number of non overlapping cb numbers in the given string
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.