Pergunta de entrevista da empresa TraceLink

medium-level leetcode based coding problem.