#Given array of integers(both +ve and -ve) find the two elements such that their sum is closest to given number x. #Time-complexity: O(nlogn) // O(nlogn){for sorting}+O(n), Auxiliary-space:O(1) #Algorithm: Sort the array and using two indexes left and right update the closest sum def closest_sum(a,x) a.sort! #You can choose any sorting algorithm of your choice with left=min_l=0 right=min_r=a.length-1 min_sum = 1.0/0.0 #Initializing min_sum with infinity while(left The two elements whose sum is minimum are 4 and 5