Steps:
1) hashmapping and to keep track of value with its count..
2)now put these elements in 2D array...m[r][2].....r - number of different
elements...
1st
col...have... the value..
2nd col...have ..the frequency..
3) Now run the randomized partition...and find (n-k)th smallest according
to frequency.....take k elements... below it...have most frequent
elements....
PRAVEEN RAJ
DELHI COLLEGE OF ENGINEERING
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.