OYO Interview Question

Sort an array based on frequency of its elements.