Pergunta de entrevista da empresa Walmart Global Tech

How many pairs present in a list having given sum.