// Count all possible pairs of array elements with sum equal to a given number / O(n)
// given number = 5
// array = [ 1, -4, 0, 9, 8, -3, 7, 5, 9];
// Expected result: 4
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections;
class Solution
{
static void Main(String[] args)
int number = 5;
int[] array = [ 1, -4, 0, 8, 9, -3, 7, 5, 9];
DoMagic(array, number);
number = 2;
array = [ 1, 1, 1, 1];
}
public static void DoMagic(int[] array, int number)