G-Research Interview Question

Easy hackerrank problems. I think there three problems.