Pergunta de entrevista da empresa X

the questions are 4 random leetcode questions