Hai guys,
Ok, the example about this problem is, i random the number such as 1234 be 3241. And i want to returned the random number 3241 into 1234 again. can anyone help me?.
Best Regards
Printable View
Hai guys,
Ok, the example about this problem is, i random the number such as 1234 be 3241. And i want to returned the random number 3241 into 1234 again. can anyone help me?.
Best Regards
So you have randomly ordered sequence of digits and you want to sort them? If so, convert your number into discrete chunks (either a string or some type of an array), then use your favorite sorting method to sort the numbers into order.
For a list of differeng sorting methods: Sorting algorithm - Wikipedia, the free encyclopedia (my personal favorite is insertion sort because of it's simplicity and fairly good performance for small data sets)
Thank you for reply helloworld922
but the randomly not just sequence i can be like "CRTG-GJK1", and i random that string and i want return it into originally. can you give me the solution for this?