what cases am i missing
Is there any edge case i'm missing out
Try for this Input:
8
86922395
correct output : 4
kindly give me a hint on how to proceed
Intuition :
Put loop on string that will give substring of every length.
create a function that will return true if the passed number is a CB number otherwise return false.
To put a check if the digit is already a part of the any other CB number, create an boolean array say, valid which store which digits till now has been a part of any other CB number.
Take a counter and increment if a CB number is found.
At the end print the count