J.P. Morgan Interview Question

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