First create an empty map key -> which is sum of a pair of elements in the array value -> list storing index of every pair having that sum
Dictionary < int , List < Pair > > map = new Dictionary < int , List < Pair > > ( ) ;