Pregunta de entrevista de G-Research

Easy hackerrank problems. I think there three problems.