Pergunta de entrevista da empresa TikTok

data structure design with O(1) complexity.