I did not find any straight answer that I am looking for in Google, so here it goes...
Is their any "algorithm" that collects unique digits/numbers from a long ("long" is not meant by data type)random number?
Such as, x = 6487657876579876867656768476876876117681761871687268726
I want to have all the possible unique numbers/digits that I can get from x. I am not looking for code. I'm looking for an "established algorithm" for doing this type of work or similar like this. Any paper/journal/book link would be useful.
EDIT: If I asked for "algorithms" that searches numbers/item from a lot of items, the answer would be : BFS, DFS, Tree, Graph etc. Similarly my question is not about coding, not even about any specific programming language, its about finding (if there is any) an algorithm that collects unique numbers from a random number. As "Muckle_ewe" said in his comment , 123 could be 1, 2, 3, 12, 23, 123 but not 13 -this is exaclty what my algorithm requirment is.
Please don't show me codes. I'm expecting a reference/name/link to any established algorithm that does this kind of simple work or similar. Of course anyone can build an algorithm for this simple work, even me. But I'm looking for a well recognized established algorithm that I can use as reference.
2nd EDIT: a little bit change to the requirement, actually I don't need all the sub-strings that I thought I would. I found that suffix tree is good for finding all the sub-strings. So it is not exact to what I'm looking for but it is a close one. Well, editing Muckle_ewe's comment, 123 could be 1, 2, 3, 12, 23 but not 13, 123 -so I only need 1 digit or 2 digit numbers from a long random number (x),this is what my algorithm requirment is, not the old one.
---Thanks.