Pergunta de entrevista da empresa Datadog

Two generic algorithms and data structures questions. Runtime complexity analysis.