Domanda di colloquio di Keysight Technologies

Take an array and a target number. Write a code to check whether there is a pair in the array, whose sum will be equal to the target number.