Finding the most frequent element in an array of numbers from 0 to n-1

Finding the most frequent element in an array of numbers from 0 to n-1 - Coding Problem | K5kC