Medium-hard interview question.