Pregunta de entrevista de G-Research

time complexity for certain events