Walmart Global Tech interview question

How many pairs present in a list having given sum.