Function to generate the original array from the pair - product array
static void constructArr ( int [ ] pair , int n ) { int size = ( 1 + ( int ) Math . Sqrt ( 1 + 8 * n ) ) / 2 ; int [ ] arr = new int [ size ] ;