This isn't a great interview question, because it's not really about programming, it's about knowledge - namely what is the mean and the frequency.

Instead, ask someone a question that encourages them to think about how to solve the question, like, write me a function that returns TRUE if the parameter is a prime number or not, or write me the backend to a login form for a website - and see whether they want to hash and salt and iterate the passwords, and whether they have a SQL injection in their code and so on.