Let's say, in the string "91910500", there are numbers (00, 10, 19, 50, 91, 105, 500, 919, 9191, 1910, 1050, 10500, etc...).
You have a range number from 0000000001 to 99999999999. And you have to find a string which contains all the numbers from that range. whatever you guess a number from that range, you will find that number in the main string.
What will be the main string for that range? With the following the code, I still see duplicate in main key.
var s = "";
for (i = 0; i < 100; i++) {
console.log('Searching the number ' + i);
d = i.toString;
if (s.indexOf(d) >= 0) {} else {
s = s.concat(i);
}
console.log('Key is \n' + s);
}