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}
-
Updated
Aug 27, 2024