Given an unordered array A of size n and integer x. What is the best complexity to find two elements in A whose sum is x? Share the algo, its complexity and if possible C code.
Please help me to find out such algorithm?