Pergunta de entrevista da empresa Salesforce

Algorithm question: pretty similar to two sum.