for eg 10, 9 most signifacnt digit of 10 is 1 and 9 is 9 so after sorting based on most significant digit is 10,9 output 910
2nd ex 2,3,5,78 most significant digit is 2,3,5,7 so out put is 78532 On May 29, 12:59 am, Vishal Jain <jainv...@gmail.com> wrote: > Can this work... > > Lets say I have following numbers > 8 9 7 4 2 121 23 21 24 27 35 79 2334 6785 > > Now repeat the last number to make all the number of equal length... > 8888 9999 7777 4444 2222 1211 2333 2111 2444 2777 3555 7999 2334 6785 > > Sort the following numbers in descending order. > 9999 8888 7999 7777 6785 ................... > > Now merge the numbers based on their actual value. > 987976785.............. > > I have not testing this entirely, but after seeing solution(Multiplying by > 10) at top, I though this might work better. > > Thanks & Regards > Vishal Jain > MNo: +91-9540611889 > Tweet @jainvis > Blog @ jainvish.blogspot.com > Success taste better when target achieved is bigger. > > P *We have a responsibility to the environment.* > > *Before printing this e-mail or any other document, let's ask > ourselves whether we need a hard copy.* > > > > > > > > On Sun, May 29, 2011 at 12:58 PM, Ashish Goel <ashg...@gmail.com> wrote: > > Radix/bucket sort.. > > > won't that help? > > > Best Regards > > Ashish Goel > > "Think positive and find fuel in failure" > > +919985813081 > > +919966006652 > > > On Fri, May 27, 2011 at 7:15 PM, <adityasir...@gmail.com> wrote: > > >> how about this case: > > >> 9, 100 -> 9100 > >> 100 9 > >> 9100 > > >> 2, 3, 9, 78 --> > >> 78 9 3 2 > >> 9 78 3 2 > > >> I guess solution should be:- > >> sort the array of numbers in an ascending order and then check for the > >> first element in the array, if there is any other element greater than it, > >> shift all the elements one right and place that element in the left most > >> space. > > >> On Fri, May 27, 2011 at 9:37 AM, wujin chen <wujinchen...@gmail.com>wrote: > > >>> @Piyush, how to deal with this case :100 , 10 > > >>> 2011/5/27 Piyush Sinha <ecstasy.piy...@gmail.com> > > >>>> we can work out if we sort according to the leftmost integer > > >>>> On 5/27/11, adityasir...@gmail.com <adityasir...@gmail.com> wrote: > >>>> > are you kidding me. Just simple sort wont work. > > >>>> > On Fri, May 27, 2011 at 9:31 AM, radha krishnan < > >>>> > radhakrishnance...@gmail.com> wrote: > > >>>> >> sort :) > > >>>> >> On Fri, May 27, 2011 at 6:57 PM, ross <jagadish1...@gmail.com> > >>>> wrote: > > >>>> >>> Hi all, > > >>>> >>> Given an array of elements find the largest possible number that can > >>>> >>> be formed by using the elements of the array. > > >>>> >>> eg: 10 9 > >>>> >>> ans: 910 > > >>>> >>> 2 3 5 78 > > >>>> >>> ans: 78532 > > >>>> >>> 100 9 > > >>>> >>> ans: 9100 > > >>>> >>> -- > >>>> >>> You received this message because you are subscribed to the Google > >>>> Groups > >>>> >>> "Algorithm Geeks" group. > >>>> >>> To post to this group, send email to algogeeks@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. > > >>>> >> -- > >>>> >> You received this message because you are subscribed to the Google > >>>> Groups > >>>> >> "Algorithm Geeks" group. > >>>> >> To post to this group, send email to algogeeks@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. > > >>>> > -- > >>>> > You received this message because you are subscribed to the Google > >>>> Groups > >>>> > "Algorithm Geeks" group. > >>>> > To post to this group, send email to algogeeks@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. > > >>>> -- > >>>> *Piyush Sinha* > >>>> *IIIT, Allahabad* > >>>> *+91-8792136657* > >>>> *+91-7483122727* > >>>> *https://www.facebook.com/profile.php?id=100000655377926* > > >>>> -- > >>>> You received this message because you are subscribed to the Google > >>>> Groups "Algorithm Geeks" group. > >>>> To post to this group, send email to algogeeks@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. > > >>> -- > >>> You received this message because you are subscribed to the Google Groups > >>> "Algorithm Geeks" group. > >>> To post to this group, send email to algogeeks@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. > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Algorithm Geeks" group. > >> To post to this group, send email to algogeeks@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. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Algorithm Geeks" group. > > To post to this group, send email to algogeeks@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. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@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.