Pergunta de entrevista da empresa Miro

DS questions. Time complexity, Space complexity.