QS/1 interview question

Write an is prime method