Pergunta de entrevista da empresa Meta

Basic algorithmic question like LeetCode .