Given an array of integers,print all the pairs whose sum is present in array?
Resposta da entrevista
Sigiloso
13 de jul. de 2017
Store the elements in unordered_set and double loop over all the elements and checking if the sum equals to the element in unordered set .
This is O(n^2).