Pergunta de entrevista da empresa Meta

Gave two leetcode problems easy/medium