American Express interview question

basic sum 2 num in array