I REPEAT, THERE is no need to SORT; http://en.wikipedia.org/wiki/Permutation#Lexicographical%5Forder%5Fgeneration
On Friday, December 14, 2012 11:56:16 AM UTC+5:30, tapan rathi wrote: > > For a given number, find the next greatest number which is just greater > than previous one and made up of same digits. --
