but how 499 is substring or superstring of 991
Doubt in the statement of problem
hey @shiva57reddy it means one digit can be used in one number only. Consider the following examples
For 5117, valid CB numbers are 5, 11, (7 or 17) not 5, 11, 17, 7 as 7 is used in more than one number.
For 81615 valid CB numbers are 5,(61 or 8161) not 5,61,8161 as 6 and 1 used in more than 1 number.