Pergunta de entrevista da empresa Expedia Group

Convert a string to integer? Given the sum find any array elements that add up to that sum.