WePay Interview Question

Basic Hackerank two sum type problem