Pergunta de entrevista da empresa FactSet

Find triplets in array so that a+b+c = k, k is given number along with array.