Cyzerg Interview Question

1. Sort the Array based on the frequency.