Goldman Sachs interview question

Coderpad: Find pairs in an array which sum equals to a given number.