Skip to content

given an array of n integers. sort the array with respect to frequency of elements, higher to lower frequency. input a[]= {7,3,3,3,7,3,2,2,3,7}, expected output after sorting (higher to lower) a[]= {3,3,3,3,3,7,7,7,2,2} ; (lower to higher) a[]= {2,2,7,7,7,3,3,3,3,3}

Notifications You must be signed in to change notification settings

sainithennredhibomireddy2005/sorting-array-according-to-frequency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

About

given an array of n integers. sort the array with respect to frequency of elements, higher to lower frequency. input a[]= {7,3,3,3,7,3,2,2,3,7}, expected output after sorting (higher to lower) a[]= {3,3,3,3,3,7,7,7,2,2} ; (lower to higher) a[]= {2,2,7,7,7,3,3,3,3,3}

Topics

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published