Given array of n integers and given a number X, find all the unique pairs of elements (a,b), whose summation is equal to X.
The following is my solution, it is O(nLo
int [] arr = {1,2,3,4,5,6,7,8,9,0};
var z = (from a in arr from b in arr where 10 - a == b select new { a, b }).ToList;