Pergunta de entrevista da empresa NASA

I do not remember exactly but it was a easy/medium problem type from leetcode. Then I was asked the runtime and space complexity of my solution.