how can one do frequency sort .

Suppose we have an integer array like

1,2,3,1,2,3,1,1,2,3,4,4,3,5,3

Then 1 is appearing 4 times
          2 - 3
          3- 5
          4-2
          5-1

Then if we sort by frequency we shud have this as result

5,4,4,2,2,2,1,1,1,1,3,3,3,3,3

How to do it

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

Reply via email to