Pergunta de entrevista da empresa HubSpot

Coding question: find all pairs from an int array equals to a target.