Pergunta de entrevista da empresa TikTok

Time complexity and space complexity