Domanda di colloquio di Amazon

Write the program for reverse the given string. Find first two number in the given array, which is equal to the given sum.