Pergunta de entrevista da empresa AlphaGrep Securities

Normal Data structure and algorithm problem.