added CheckForPairInArrayWithSumAsX