Cb number check

how to check if the 61 is CB number or not ?? code

  • 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.
    pehel 1 length ke substring pe work kro then 2 length … 3 length …
    because find the maximum number of CB numbers that can be formed from the given string

This is the code for reference https://ide.codingblocks.com/s/293698

@sdevwrat
checkout this please

I’m extremely sorry for the late reply.
Now your code is working https://ide.codingblocks.com/s/302551

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.