What corner cases am i missing?


I am getting wrong answers for 3 test cases ?

Your both loops need to be interchanged, and then you will need an extra array to check if any number is already visited.
In your implementation, suppose we start from 0 and minimum length on which CB number is formed is 10, now you update i so that next iteration starts from i=10, but there might be a CB number from 1 to 3 and 4 to 5 both will be skipped.
So first check all possibilites for len 1, then for len 2 and so on.

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.