Check if pair with given Sum exists in Array (Two Sum)
Given an array arr[] of n numbers and another number target, the task is to check whether or not there exist two elements in arr[] whose sum is exactly the target. That means you just need to find whether or not there exist two elements in an array whose sum…