use something like radix sort, but from numbers left to right. in given example: 87 36 52
87 36 52 place 87 then 52 than 36 if input is something like 9 87 36 52 place 9875236 this you can do with minor modification of radix sort. thanks Rajesh On Fri, Aug 12, 2011 at 6:31 PM, Abhishek Gupta <guptaabhishe...@gmail.com> wrote: > see the second example...if a single digit is there...tht will be at the > very end of the array...and if it is 9 it must come at first place...there > it goes wrong... > > On Fri, Aug 12, 2011 at 6:23 PM, Prem Krishna Chettri <hprem...@gmail.com> > wrote: >> >> Amazing , >> Kindly Follow me up :- >> >> 1> Given Array of Random Value ... say int a[]= >> {20,365,299,50,....67,21}; >> Apply Any Sorting Algo on it... which Results into somewhat >> like a={365,299,67,50,21,20,.......... blah..}... >> 2> Well No U hv to put those values to a string variable. >> Please lemme knw if I need more clarification.. This is simple where is >> the messy part?? >> >> >> >> On Fri, Aug 12, 2011 at 6:16 PM, Nitin Nizhawan <nitin.nizha...@gmail.com> >> wrote: >>> >>> radix sort the digits wrong way (left most digit first), and then >>> concatenate >>> >>> On Fri, Aug 12, 2011 at 6:12 PM, Yasir <yasir....@gmail.com> wrote: >>>> >>>> Kindly check it with both the examples. It won't work. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msg/algogeeks/-/VlT1DNH-vPkJ. >>>> 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. > > > > -- > Thanks & Regards > Abhishek Gupta > BITS, Pilani > > -- > 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.