steps: 1) use hash mapping to keep track of frequency of each and every element. 2)Then iterate hash table and store in 2D array with 1st column(element value) and 2nd column(frequency of element value). 3)sort the row according to second column(i.e frequency). 4)Then Print the element row wise.. .
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 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.