i have a left and right pointer . if it is a cb number , i increase left pointer . if it is not i increase right pointer . and when right pointer reaches end of string but left is not at end of string , i increase left pointer and start again from right = left.
Passes 6 test cases . fails 3
when i opened this link, i found an input written already,
3
105 -107 109
And if you are working of an input like this,
then, the length of the string is 12, not 3.
You are required to enter the number of characters in the string,
then you have to input the string of same specified length containing positive numbers only.
Also, you have to check whether a digit in a cb number had occurred in previous cb numbers or not. If it is occur before don’t count that number.
Try, to resolve these issues.
Hope, this would help.
I am marking this thread as resolved as you have not replied to it since 5 days.
off chance , you still have any doubt regarding the same, reopen it.
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.