By the algo I gave : 1. Grouping - 3 digits - 111 1 digit - 6,5,9
2. Sorting within each bucket 3 digits - 111 1 digit - 5,6,9 3. Concatenation by descending order of number of digits, and increasing order within each digit bucket - Grouping would then be - 3 digit numbers in sorted order followed by 1 digit numbers in sorted order 111 5 6 9 Is there a number smaller than 111569 that can be formed with the set given? Also, I am not sure about the complexity of this algo. On Thu, Aug 19, 2010 at 1:56 PM, BALARUKESH SIVARAMAN < sbalarukesh1...@gmail.com> wrote: > @Divya : > Does the algo you gave work for the set { 6,5,9,111} ? > I hope it doesnt... Correct me if i am wrong.... > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.