G-Research interview question

Easy hackerrank problems. I think there three problems.