Can someone please tell me what i am doing wrong? as only three test are correct
Hi Sarthak,
I think You don’t seem to understand the question. for eg.
if input = 81605 , your code considers numbers like 81, 816, 8160, 81605, 16, 160, 1605,…etc.
suppose 816 and 160 pass the test. You count them as 2 numbers, but this is not valid as cb numbers cannot overlap.
You need to check for non-overlapping substrings.
Reply if resolved