[algogeeks] Sort string based upon the count of characters

2011-01-12 Thread Davin
Smaple Data :

input : abcdacdc
Output : cadb

If the count is same for  characters. maintain the original order of
the characters from input string.

Please do let me know for any clarification.

-- 
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.



Re: [algogeeks] Sort string based upon the count of characters

2011-01-12 Thread sourabh jakhar
we can use the count sort array in this to count the frequencies of
character (array size would be fixed 26)
and sort that counting array by again count sort or quick sort in decrsaing
order and than print the valur in ascci format '97+i'.



On Thu, Jan 13, 2011 at 11:53 AM, Davin dkthar...@googlemail.com wrote:

 Smaple Data :

 input : abcdacdc
 Output : cadb

 If the count is same for  characters. maintain the original order of
 the characters from input string.

 Please do let me know for any clarification.

 --
 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.comalgogeeks%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
SOURABH JAKHAR,(CSE)(3 year)
ROOM NO 167 ,
TILAK,HOSTEL
'MNNIT ALLAHABAD

The Law of Win says, Let's not do it your way or my way; let's do it the
best way.

-- 
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.



Re: [algogeeks] Sort string based upon the count of characters

2011-01-12 Thread Bhavesh agrawal
we can also the concept of HASHING to count the frequency of each character
.

On Thu, Jan 13, 2011 at 11:53 AM, Davin dkthar...@googlemail.com wrote:

 Smaple Data :

 input : abcdacdc
 Output : cadb

 If the count is same for  characters. maintain the original order of
 the characters from input string.

 Please do let me know for any clarification.

 --
 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.comalgogeeks%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 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.