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
less than o(n) solution will be=>
function(array,k) var map = {}; for element in array map(element) = true; if(map(k-element)) return {k,element}