Class to represent a pair
public class pair { private readonly ArrayElements outerInstance ; public int first , second ; public pair ( ArrayElements outerInstance , int f , int s ) { this . outerInstance = outerInstance ; first = f ; second = s ; } }