Question d’entretien chez J.P. Morgan

Given an array of integers sort the array based on frequency of elements.