Pergunta de entrevista da empresa Google

OA, two questions, i would say leetcode medium